i have the following problem - i am using BCMenu in an MDI aplication but when there is a document open menu icons are not visualised. I tracked the problem to the fact that CMainFrame::OnInitMenuPopup is recieving a CTempMenu instead of BCMenu object.
Does anyone had the same problem and what can be done to correct this?
I am confused about how to get a SubBCMenu. To get a CMenu, you can use the functions:
CMenu* GetSubMenu (int nPos);
However, you cannot do the same for BCMenu: BCMenu* GetSubBCMenu(char* lpszSubMenuName);
So, why is there no way to get a sub menu by index as well? Having a dependency on the text of the menu seems not like a good design idea.
I need to dynamically change the text of submenus, and if I get a CMenu and change the text, it looks ugly. So I have to use the BCMenu function, but I'm unable to get the BCMenu because of lack of an easy functions to use.
actually i want to create a popup menu at click of my toolbar button.
i dont know how to create the the popup menu with different menuitems at run time.
if anyone has the idea and code please help me.
thanx a lot in advance
Here is a very basic sample program on how to get this functionality to work on a toolbar.
See the TMenu section on the following web page.
The details of how to get it to work are very similar to the details described about
how to get the Cool Owner Drawn Menus with Bitmaps to work. There are some differences
in the creation of the menus and additional code when you create the toolbar.
Did accelerators work before you started using BCMenus? If not, it probably is because you're using the CDialog class, it doesn't support accelerators by default. See here for an example on how to add the needed code:
thanks for the help... now i tried to capture the OnKeyDown event... but to no success... is it the same problem as before....could you please tell me how to add the Onkeydown event.
In plugin, where could I add the message handlers for the WM_MEASUREITEM, WM_MENUCHAR, and WM_INITMENUPOPUP messaga (No CMainFrame or CDialog).If I don't add these handles ,no text will show on the menu.
Secone, I'd like to request MENUEX to be supported as well.
I found out that a project I work with uses MENUEX instead of MENU (You can find it in ProjectName.rc). In this case, the LoadMenu() method on BCMenu flips out and the menu becomes really strange looking. When I changed to use MENU instead it all worked well. For now I'm fully satisfied with MENU, but from what I can understand, MENUEX offers some extra features and in the future I might wanna use it...
Are there any plans of implement support for MENUEX in this project?
Last Visit: 31-Dec-99 18:00 Last Update: 22-Sep-14 10:49