Click here to Skip to main content
15,912,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Queue problem (part2) Pin
Christian Graus2-Dec-02 10:55
protectorChristian Graus2-Dec-02 10:55 
GeneralResizing a CFormView class Pin
Georgi Atanasov2-Dec-02 10:12
Georgi Atanasov2-Dec-02 10:12 
GeneralRe: Resizing a CFormView class Pin
Maximilien2-Dec-02 10:50
Maximilien2-Dec-02 10:50 
GeneralWrite to parallel port Pin
Shay Harel2-Dec-02 10:03
Shay Harel2-Dec-02 10:03 
Generalhelp: right mouse click pop up menu Pin
trustno12-Dec-02 8:50
trustno12-Dec-02 8:50 
GeneralRe: help: right mouse click pop up menu Pin
valikac2-Dec-02 8:57
valikac2-Dec-02 8:57 
GeneralRe: help: right mouse click pop up menu Pin
Jason Henderson2-Dec-02 9:16
Jason Henderson2-Dec-02 9:16 
GeneralRe: help: right mouse click pop up menu Pin
Nitron2-Dec-02 10:00
Nitron2-Dec-02 10:00 
Try this:

CPoint p;
GetCursorPos(&p);
CMenu menu;
menu.LoadMenu(IDR_MY_MENU)			
CMenu* pPopup = menu.GetSubMenu(0);
ASSERT(pPopup != NULL);
pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, p.x, p.y, AfxGetMainWnd()); 


note: the commands will be routed to the main window. To rout the commands to another place, replace AfxGetMainWnd() with a CWnd* of the window you want to get the messages.


- Nitron


"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
GeneralWizardsheet - propertypage and AfxMessageBox Pin
André Dewispelaere2-Dec-02 8:35
André Dewispelaere2-Dec-02 8:35 
GeneralCListCtrl + Report View + ... Problem Pin
mickelthepickle2-Dec-02 8:00
mickelthepickle2-Dec-02 8:00 
GeneralRe: CListCtrl + Report View + ... Problem Pin
pranavamhari2-Dec-02 14:44
pranavamhari2-Dec-02 14:44 
GeneralUDP and port 0 Pin
Dave_2-Dec-02 7:31
Dave_2-Dec-02 7:31 
GeneralRe: bind and port numbers Pin
Le centriste2-Dec-02 7:40
Le centriste2-Dec-02 7:40 
GeneralRe: bind and port numbers Pin
Dave_2-Dec-02 7:56
Dave_2-Dec-02 7:56 
GeneralRe: bind and port numbers Pin
Rickard Andersson202-Dec-02 8:04
Rickard Andersson202-Dec-02 8:04 
GeneralRe: bind and port numbers Pin
Dave_2-Dec-02 8:24
Dave_2-Dec-02 8:24 
GeneralRe: bind and port numbers Pin
Rickard Andersson202-Dec-02 8:34
Rickard Andersson202-Dec-02 8:34 
GeneralRe: bind and port numbers Pin
Dave_2-Dec-02 8:38
Dave_2-Dec-02 8:38 
GeneralRe: bind and port numbers Pin
Rickard Andersson202-Dec-02 8:42
Rickard Andersson202-Dec-02 8:42 
GeneralRe: bind and port numbers Pin
carrie2-Dec-02 11:30
carrie2-Dec-02 11:30 
Generalrecursively search the registry and delete text Pin
Derek Smigelski2-Dec-02 7:04
Derek Smigelski2-Dec-02 7:04 
GeneralRe: recursively search the registry and delete text Pin
Joan M2-Dec-02 9:11
professionalJoan M2-Dec-02 9:11 
GeneralFile extension and default icon Pin
act_x2-Dec-02 6:51
act_x2-Dec-02 6:51 
GeneralRe: File extension and default icon Pin
Rickard Andersson202-Dec-02 7:32
Rickard Andersson202-Dec-02 7:32 
GeneralRe: File extension and default icon Pin
act_x2-Dec-02 8:05
act_x2-Dec-02 8:05 

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.