Issues about owner draw menu. | developer.brewmp.com Issues about owner draw menu. | developer.brewmp.com

Developer

Issues about owner draw menu.

Forums:

Although API ref doc covers owner draw menu. I want to get more sample code about this topic.

Could some body help me?

Thanks. :o

There is not currently any official sample code available that demonstrates this functionality, but if you have any specific questions, I'd be happy to try and answer them.

There is not currently any official sample code available that demonstrates this functionality, but if you have any specific questions, I'd be happy to try and answer them.

Could some one show me an example about owner draw menu?
I want to know how to measure item and how to draw item.
Thanks for your help.

Could some one show me an example about owner draw menu?
I want to know how to measure item and how to draw item.
Thanks for your help.

Take a look at the API documentation for IMENUCTL_GetItemRect() and IMENUCTL_SetOwnerDrawCB().

Take a look at the API documentation for IMENUCTL_GetItemRect() and IMENUCTL_SetOwnerDrawCB().

I want to display multi-line text and image in selected menu item, can i achieve this goal by using owner draw mechanism of menu control?
Thanks.

I want to display multi-line text and image in selected menu item, can i achieve this goal by using owner draw mechanism of menu control?
Thanks.

Yes, you can achieve this goal.
Basically, the way Owner Drawn menu items work is this: You specify a function that is invoked when a menu item needs to be drawn. When it is called, this function is passed information about which menu item to draw, and the rectangle in which it should be drawn. Within that rectangle, you can draw whatever you want.

Yes, you can achieve this goal.
Basically, the way Owner Drawn menu items work is this: You specify a function that is invoked when a menu item needs to be drawn. When it is called, this function is passed information about which menu item to draw, and the rectangle in which it should be drawn. Within that rectangle, you can draw whatever you want.

Thanks for your help.
In theory, your idea is right. But my sample code indicates that menu control doest not support items with different height.
For instance, i set height of selected item to be 50, and height of default item to be 25, the result is all item height is 50. In other words, implementation of menu control recaculated height of all items.

Thanks for your help.
In theory, your idea is right. But my sample code indicates that menu control doest not support items with different height.
For instance, i set height of selected item to be 50, and height of default item to be 25, the result is all item height is 50. In other words, implementation of menu control recaculated height of all items.

You are correct, the current IMenuCtl implementation does not allow for different heights for selected and unselected items.
This seems to have been a concious decision to prevent having to redraw every menu item each time the selection changes.

You are correct, the current IMenuCtl implementation does not allow for different heights for selected and unselected items.
This seems to have been a concious decision to prevent having to redraw every menu item each time the selection changes.

hi all,
I am trying to draw owner drawn menu, similar to following thread, but the problem is timer never gets called!
http://brewforums.qualcomm.com/showthread.php?t=3690&highlight=IMENUCTL_...
appreciate your help!

hi all,
I am trying to draw owner drawn menu, similar to following thread, but the problem is timer never gets called!
http://brewforums.qualcomm.com/showthread.php?t=3690&highlight=IMENUCTL_...
appreciate your help!