hi, good site and nice forum! I am having a little problem with toolbars: i am using an mdi application, it all works fine, then i decided to use a toolbar, and the problem is that the toolbar covers the client area of the client window in the mdi. That is, the toolbar is displayed correctly, but when i create a child window in the mdi this child is covered by the toolbar. If i maximaize a child window i have the same problem: the toolbar is always covering the client area of the child. How do i solve this problem? I have used a toolbar32 control and also a rebar32, but the problem is always the same. I have read both Win95Example and WinSkeleton source, the first seems to have the same problem :-(
What am i missing? I just cant find docs on rebar32, is there any doc on this? Thanks a lot!
Posted on 2001-12-18 08:32:21 by AndreaGeddon
you need to resize your toolbar and midi at the same time as the window is sized.


rect RECT <?>


INVOKE GetClientRect, hWnd, addr rect ;get size of main window
INVOKE MoveWindow, hMidi, 0, 46,rect.right, rect.bottom,TRUE ;set rectangle of Midi to size of main window
INVOKE MoveWindow, hToolbar, 0,0,0,0,TRUE ;set rectangle of toolbar to size of main window

this should work although you will have a problem of the horizonal scrollbar not showing but i think this should be a simple fix i just havent had time to look into it yet.

that would work but if your main window is static when u create your midi window is where u need to make the fix. so i would go something like this:

INVOKE CreateWindowEx, NULL,
ADDR MidiClassName,
0,46,put size u want here,and here, ;important the size of 46 should place the top of your midi to just below your toolbar
MOV hMide,eax
Posted on 2001-12-18 09:38:59 by smurf
mmm i tried and tried to size or move the mdi, it just didnt move! Then reading your code i found my error: i was creating the MDI in the WM_CREATE of main window, and dunno why but the mdiclient did not size or move. Now i put the creation of it outside the wndproc of main window and your method works perfectly!
Thank you !!!
Posted on 2001-12-18 18:11:16 by AndreaGeddon