Tool bars are getting rearranged

97 views Asked by At

I am using VC++ MFC and have the following toolbars in my software.

Original toolbar position

While working with different screens and software is minimized, if we disconnect the other screen, the toolbars get messed up after restoring the application.

Re arranged toolbars

Also that issue occurs, sometimes, when using single screen and change screen resolution or laptop lid is closed and re-open it, most of the cases when application is minimized at time we change anything.

We are not executing any code as such to draw the toolbars every time. While software is starting up, we read the toolbar positions from registry and create toolbars, and while closing application, we read the toolbar current position and save it back to registry.

Please suggest what should I do to fix this..

Thanks...

1

There are 1 answers

0
Nilesh Bhagate On

From the details what i can say is, while you were working on screen of one size the application considering the toolbar co-ordinates in relation to that screen. But when screen changes the old co-ordinates are no more valid as new screen may have different size and that's what causing the issue.