Menu Ownerdraw and WindowFromDC
-
LPDRAWITEMSTRUCT lpdis;
In an Ownerdrawn menu handlerWindowFromDC(lpdis->hDC)
always return zero?:confused: Any clues? Thanks, Derick. -
LPDRAWITEMSTRUCT lpdis;
In an Ownerdrawn menu handlerWindowFromDC(lpdis->hDC)
always return zero?:confused: Any clues? Thanks, Derick.And it always will. HMENU's are the resource of a window - and never a true user accessable window themselves. It has something to do with the way that windows internally deals with menus - somehow that bit of geek trivia is lost to me & forgotten. But I wouldn't wory about it, if you're doing an owner draw menu - all you need is the HDC anyways. If you need dimensions of the full menu for a side bar or something, I'd check out the multiple ownerdraw menu samples here on codeproject. [ Jason De Arte | Toy Maker | 1001010.com ]
-
And it always will. HMENU's are the resource of a window - and never a true user accessable window themselves. It has something to do with the way that windows internally deals with menus - somehow that bit of geek trivia is lost to me & forgotten. But I wouldn't wory about it, if you're doing an owner draw menu - all you need is the HDC anyways. If you need dimensions of the full menu for a side bar or something, I'd check out the multiple ownerdraw menu samples here on codeproject. [ Jason De Arte | Toy Maker | 1001010.com ]
But I think I found the problem. It has something to do with mwnu animation. for animation purpouse, widows supplies another dc. This is what i think happens with a context menu.:doh: -Derick