Hi,
I am new to WIN32 assembly. I have started a project to learn it. But I have encountered the following problem.
The program is a MDI application, with two other windows in the parent frame. I create the MDIClient window and then resize the MDIClient window, to make room for two more windows. These two new windows are not siblings of the MDIClient window. They are children of the frame window. However after I create these windows, the menu does not function properly. I have to click on a menu item and then move the mouse down, where the pulldown menu is supposed to appear, and only then the menu is shown? Why?
I am new to WIN32 assembly. I have started a project to learn it. But I have encountered the following problem.
The program is a MDI application, with two other windows in the parent frame. I create the MDIClient window and then resize the MDIClient window, to make room for two more windows. These two new windows are not siblings of the MDIClient window. They are children of the frame window. However after I create these windows, the menu does not function properly. I have to click on a menu item and then move the mouse down, where the pulldown menu is supposed to appear, and only then the menu is shown? Why?
Afternoon, Rob.
I'm only having a guess here. Are you painting over the client area of the main window in WM_PAINT?
Cheers,
Scronty
I'm only having a guess here. Are you painting over the client area of the main window in WM_PAINT?
Cheers,
Scronty
Hello Scronty,
I use the frame window's WM_PANIT message to resize and reposition the MDIClient window. This has to be done everytime the window is shown or repainted, otherwise the frame window gives all its its client area to the MDIClient window (or MDIClient windows claimes it!?). Other than that I do not do any painting, so to speak (i.e. BeginPaint, Endpaint). But now that you mentioned it, I am going to put the same code in other message handlers of the frame window. I think I tried couple of them and I don't remember that solving the problem. I am going to try some more messages. I will post the result.
I am also going to try to use other widows message handlers for the resizing and repositioning. Maybe that will work.
I use the frame window's WM_PANIT message to resize and reposition the MDIClient window. This has to be done everytime the window is shown or repainted, otherwise the frame window gives all its its client area to the MDIClient window (or MDIClient windows claimes it!?). Other than that I do not do any painting, so to speak (i.e. BeginPaint, Endpaint). But now that you mentioned it, I am going to put the same code in other message handlers of the frame window. I think I tried couple of them and I don't remember that solving the problem. I am going to try some more messages. I will post the result.
I am also going to try to use other widows message handlers for the resizing and repositioning. Maybe that will work.
Bingo.
I moved the code out of WM_PAINT and now everything seems to be OK.
Thanks.
I moved the code out of WM_PAINT and now everything seems to be OK.
Thanks.