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 |
Does the application have more than one object? If no, then what is the reason?
Tell us something about MFC?
How we can findout Memoryleaks, In what way it can be avoided
what message is sent to an application when the user presses the primary button?
I want recent paper pattern for HP company?
Hi All, i am new for VC++ SDK. i want to get the IP Address of all the External device connected with my local machine.please give the code Regards, Praveer
How do I create a dialog box in mfc?
1)set the Title for The File DialogBox, in MFC?
Name the Synchronization objects?
List out the parameters of WinMain Function.
what is the difference between compiling and building?
If application hangs while SendMessage is waiting for the result, how you handle it?