DrawItem lost for MenuItem in MDI app

E

Eugene Pankov

Found a problem: a Form for MDI app contains MenuItems with
OwnerDraw=true and added DrawItem and MeasureItem functions.
The form contains a Child Form with a normal menu.

If you open a few child forms and close them - the OwnerDrawn menu on
the parent form disappears - just a blank rectangle. It only happens if
a child form contains a menu added/merged to the parents menu.

Anybody knows a workaround? It seems a bug in the framework.

Eugene
 
D

DalePres

I know of at least one other case where the drawItem routine is never called
for ownerdraw menus. The case I have problems with is in context menus
called from a notifyIcon object. See KB #827043.

With that in mind, I'd say it's very likely that in your case you have the
same problem - so yes, it is likely a bug.

Dale
 
E

Eugene Pankov

Thank you, Dale
I think you are right. The MenuItem does not respond to WM_DRAWITEM event.

Eugene
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top