Click here to Skip to main content
15,922,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: graphical error Pin
anmol m15-Jun-06 7:11
anmol m15-Jun-06 7:11 
GeneralRe: graphical error Pin
khan++15-Jun-06 21:12
khan++15-Jun-06 21:12 
QuestionA newb needs help. Pin
zach713-Jun-06 16:01
zach713-Jun-06 16:01 
AnswerRe: A newb needs help. Pin
Mark F.13-Jun-06 17:15
Mark F.13-Jun-06 17:15 
AnswerRe: A newb needs help. Pin
Ganesh_T13-Jun-06 18:46
Ganesh_T13-Jun-06 18:46 
AnswerRe: A newb needs help. Pin
Laxman Auti13-Jun-06 18:53
Laxman Auti13-Jun-06 18:53 
Questionpopup menu in a listbox [modified] Pin
locoone13-Jun-06 15:48
locoone13-Jun-06 15:48 
AnswerRe: popup menu in a listbox Pin
Sarath C13-Jun-06 17:38
Sarath C13-Jun-06 17:38 
map the right click message of the control
and use a CMenu object to create popup menu

MSDN has the sample code

here it is
// The code fragment below shows how to create a new menu for the
// application window using CreateMenu() and CreatePopupMenu().
// Then, the created menu will replace the current menu of the
// application. The old menu will be destroyed with DestroyMenu().
// NOTE: The code fragment below is done in a CFrameWnd-derived class.

// Create a new menu for the application window.
VERIFY(m_NewMenu.CreateMenu());

// Create a "File" popup menu and insert this popup menu to the
// new menu of the application window. The "File" menu has only
// one menu item, i.e. "Exit".
VERIFY(m_FileMenu.CreatePopupMenu());
m_FileMenu.AppendMenu(MF_STRING, ID_APP_EXIT, (LPCTSTR)"E&xit");
m_NewMenu.AppendMenu(MF_POPUP, (UINT) m_FileMenu.m_hMenu, "&File");

// Remove and destroy old menu
SetMenu(NULL);
CMenu* old_menu = CMenu::FromHandle(m_hMenuDefault);
old_menu->DestroyMenu();

// Add new menu.
SetMenu(&m_NewMenu);

// Assign default menu
m_hMenuDefault = m_NewMenu.m_hMenu;


SaRath.

"Don't Do Different things... Do Things Differently..."

Understanding State Pattern in C++

AnswerRe: popup menu in a listbox Pin
Hamid_RT13-Jun-06 19:41
Hamid_RT13-Jun-06 19:41 
AnswerRe: popup menu in a listbox Pin
Hamid_RT13-Jun-06 20:09
Hamid_RT13-Jun-06 20:09 
AnswerRe: popup menu in a listbox Pin
Hamid_RT14-Jun-06 19:12
Hamid_RT14-Jun-06 19:12 
QuestionFind a certain text string on the IE's current loaded webpage Pin
Joseph Lee13-Jun-06 15:13
Joseph Lee13-Jun-06 15:13 
AnswerRe: Find a certain text string on the IE's current loaded webpage Pin
Ganesh_T13-Jun-06 18:55
Ganesh_T13-Jun-06 18:55 
AnswerRe: Find a certain text string on the IE's current loaded webpage Pin
Laxman Auti13-Jun-06 18:55
Laxman Auti13-Jun-06 18:55 
QuestionopenGL,memory leak with glDrawPixels Pin
leon913-Jun-06 14:16
leon913-Jun-06 14:16 
Questioncolor change Pin
sidkraft13-Jun-06 14:09
sidkraft13-Jun-06 14:09 
AnswerRe: color change Pin
Sarath C13-Jun-06 17:49
Sarath C13-Jun-06 17:49 
AnswerRe: color change Pin
Hamid_RT13-Jun-06 19:39
Hamid_RT13-Jun-06 19:39 
QuestionAbout manifest Pin
angelfirefox13-Jun-06 13:46
angelfirefox13-Jun-06 13:46 
QuestionUnmanaged Threading Pin
Chris J13-Jun-06 10:49
Chris J13-Jun-06 10:49 
AnswerRe: Unmanaged Threading Pin
led mike13-Jun-06 10:59
led mike13-Jun-06 10:59 
GeneralRe: Unmanaged Threading Pin
Jun Du13-Jun-06 12:25
Jun Du13-Jun-06 12:25 
GeneralRe: Unmanaged Threading Pin
Graham Bradshaw13-Jun-06 12:33
Graham Bradshaw13-Jun-06 12:33 
GeneralRe: Unmanaged Threading Pin
Joe Woodbury13-Jun-06 13:07
professionalJoe Woodbury13-Jun-06 13:07 
GeneralRe: Unmanaged Threading Pin
Arvind Bharti13-Jun-06 20:23
Arvind Bharti13-Jun-06 20:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.