Home > database >  I need to add a menu on the dialog, how do I solve?
I need to add a menu on the dialog, how do I solve?

Time:09-26

I do things under WinCE, using MFC under vs2005, I now to create good dialog to add a menu, yes a lot of kinds of methods are not,

This method doesn't work:
1. To add menu (IDR_MENU1) resources, and combined with the need of menu items,
2. Edit dialog resource attribute, select Menu properties in the properties dialog for IDR_MENU1 (you to add the Menu resource),

If you do not want to directly in the properties dialog box Settings menu, and through code dynamically generated in your application can use the following methods:
1. The member variable is added in the dialog class reputation CMenu m_menu
In OnInitDialog () to add the following code:
//load the menu
M_menu. LoadMenu (IDR_MENU1);
//set the current menu
SetMenu (& amp; M_menu);
//when you don't need a menu can use SetMenu (NULL); To cancel the current menu

The reason is under WinCE no SETMENU this function;
Please help me do example, thank you, urgent need

CodePudding user response:

I'm a little don't know the building Lord,,,,
  • Related