Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i set the size of menu Items ?

Status
Not open for further replies.

dima2

Programmer
Jan 20, 2002
85
LB
Hi,
is there a way to set the width and height of menu Items ?
I'm talking regular CMenu here.
I just want to be able to change the default size either after creating the menu in the resource editor or dynamically.
 
Hi,
You can set the width and height of CMenu items by overriding the OnMeasureItem virtual function. But this function is only called once, when the menu is created.
If you want to dynamically change the dimensions of the menu items, you have to delete and recreate the menu.
Look at the WM_MEASUREITEM message.
Hope this helps,
srfink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top