Owner draw menu does not call DrawItem
- From: Headache <rquirk@xxxxxxxxxxxxxx>
- Date: Thu, 04 Oct 2007 01:16:07 -0700
When a user right clicks in the view I display a context menu with
TrackPopupMenu. This context menu is derived from CMenu and has owner
draw items on it. The menu's parent is the view. When I run it in the
debugger the view calls CWnd::OnMeasureItem which calls MeasureItem
in my menu class. I fill in the itemWidth and itemHeight members.
However the framework doesn't then go and call either:
OnDrawItem in my view class or
Cwnd::OnDrawItem or
DrawItem in my menu class
I am using Microsft Visual Studio 2005. I wrote a noddy program
because the mechanism appears broken in a more complex program but
DrawItem isn't called in the noddy program either!
What have I missed or is this broken in MFC8?
.
- Follow-Ups:
- Re: Owner draw menu does not call DrawItem
- From: Giovanni Dicanio
- Re: Owner draw menu does not call DrawItem
- Prev by Date: Re: modeless dialog boxes
- Next by Date: Re: Recreate a Window ... how to stop asserts...?
- Previous by thread: Re: Chart control for 3D surface and contour plots
- Next by thread: Re: Owner draw menu does not call DrawItem
- Index(es):