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?
Posted on 2001-08-29 11:00:26 by Rob
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
Posted on 2001-08-29 16:51:26 by 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.
Posted on 2001-08-30 06:28:59 by Rob
Bingo.

I moved the code out of WM_PAINT and now everything seems to be OK.

Thanks.
Posted on 2001-08-30 16:26:46 by Rob