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

Re: DrawItem lost for MenuItem in MDI app by DalePres

DalePres
Wed Feb 11 09:17:54 CST 2004

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


"Eugene Pankov" <eugene.p@parks.lv> wrote in message
news:u9UMt$I8DHA.1112@tk2msftngp13.phx.gbl...
> 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
>



Re: DrawItem lost for MenuItem in MDI app by Eugene

Eugene
Wed Feb 11 10:46:51 CST 2004

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

Eugene