|
-
March 19th, 2007, 01:07 PM
#1
Questions about WM_MEASUREITEM
Does anybody know how to force WM_MEASUREITEM? In particular, for a owner drawn menu?
I googled for it, but couldnt find an answer that works for me. I heard suggestions to modify a menu item, but that didnt work. I finally got it to work with brute force -- recreate the entire menu each time I want it to be re-measured. I was wondering if anyone knew an easier 'trick'?
Also, when I'm handling WM_MEASUREITEM (for owner drawn popup menu), I cant access the HMENU, unless I saved it in the 'data' field of MENUITEMINFO. Does anyone know of a way to access the HMENU inside WM_MEASUREITEM without having saved the HMENU?
Thanks,
-Martin
-
March 19th, 2007, 03:12 PM
#2
Re: Questions about WM_MEASUREITEM
I googled for it, but couldnt find an answer that works for me. I heard suggestions to modify a menu item, but that didnt work. I finally got it to work with brute force -- recreate the entire menu each time I want it to be re-measured. I was wondering if anyone knew an easier 'trick'?
In my experience, the WM_MEASUREITEM message is sent again when the text of all the items in the menu is changed.
Also, when I'm handling WM_MEASUREITEM (for owner drawn popup menu), I cant access the HMENU, unless I saved it in the 'data' field of MENUITEMINFO. Does anyone know of a way to access the HMENU inside WM_MEASUREITEM without having saved the HMENU?
Of course you can't access it, there's no HMENU member in the WM_MEASUREITEM... Another solution is a global variable...
-
March 19th, 2007, 04:00 PM
#3
Re: Questions about WM_MEASUREITEM
Thanks kkez.
 Originally Posted by kkez
Of course you can't access it, there's no HMENU member in the WM_MEASUREITEM... Another solution is a global variable...
I meant to say 'access the HMENU inside WM_MEASUREITEM handler'
Thanks for the info.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|