Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28532 Discussions

Question about WM_MDITILE, MDITILE_VERTICAL

reidar
New User
254 Views

In a MDI application I open several windows. After opening the windows are overlapping each other and then I will to arrange them with the program lines:

                case (IDM_VTILE)

                   iret = SendMessage(ghwndClient, &

                                  WM_MDITILE, MDITILE_VERTICAL, 0)                  

                   MDIWndProc = 0

                   return

 

This works fine, but let’s say I have three windows. Window number 3 will be at the left,

window 2 in the middle and window number 1 to the right.

I want the windows to be arranged in reversed order compared to what Windows does.

Is there any (simple) way to solve this?

0 Kudos
2 Replies
andrew_4619
Honored Contributor III
254 Views

I do not know if there is s easy solution but I use  SetWindowPos and GetWindowRect. I have a couple of menu options, one to save the current window positions and sizes to a file and one the set positions and sizes from a file made earlier. So arrange to a way you like and save and then use these thereafter. This gives a whole host of possibilities....

Initially I automatically set the last window position but decided this was a bad idea as if you flip from having a laptop with an external monitor to just one monitor you can end up with everything totally outside the display area.

0 Kudos
reidar
New User
254 Views

OK, I understand there is easy way to over-ride the "last created - first displayed" principle applied by Windows.

Anyway, thank you so much for your help!

Best regards

Reidar

0 Kudos
Reply