How to handle dynamic menus in MFC?
Answers were Sorted based on User's Feedback
Answer / fahim
Dynamic menus can be handled using Cmenu's
Createmenu,Insrtmenu and Appendmenu functions.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / swetha palanki
//create object of CMenu in .h file of the frame window.
CMenu m_MyMenu;
//implement this is .cpp of frame window.
m_MyMenu = LoadMenu(ID_Menu1);
SetMenu(m_MyMenu);
| Is This Answer Correct ? | 2 Yes | 3 No |
Answer / sudhir kumar singh
CMenu contextMenuitm;
contextMenuitm.LoadMenu(IDR_SUBMIT);
CButton *pButton;
pButton=reinterpret_cast<CButton *>(GetDlgItem
(IDC_SUBMIT_BTN));
CRect rectSubmitButton;
pButton->GetWindowRect(&rectSubmitButton);
CMenu *getPopupMenu=contextMenuitm.GetSubMenu(0);
getPopupMenu->TrackPopupMenu(TPM_LEFTALIGN |
TPM_RIGHTBUTTON, point.x, point.y, this);
| Is This Answer Correct ? | 1 Yes | 2 No |
if both base and derived class have the constructors if i create an object for derive class which class constructor is executed first
What is the command routing in MFC framework?
Explain in sort What is CTargetObject?
How can i change the color of a dropdowncombobox elements
What is the base class for most MFC classes?
1)How to change a text of a button in runtime?
What is the range of intensity of RGB
What is the use of message map ?
how do u identify RTTI in vc++
What is the base class for MFC
what message is sent to an application when the user presses the primary button?
Explain Doc/View architecture