Click here to Skip to main content
15,907,233 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do I set the baud rate of a remote computer?? Pin
Ceri15-Apr-03 2:45
Ceri15-Apr-03 2:45 
QuestionCScrollView center? Pin
-Dy15-Apr-03 0:25
-Dy15-Apr-03 0:25 
AnswerSolved Pin
-Dy15-Apr-03 0:55
-Dy15-Apr-03 0:55 
QuestionHow to draw a transparent circle? Pin
melwyn14-Apr-03 23:41
melwyn14-Apr-03 23:41 
AnswerRe: How to draw a transparent circle? Pin
jeremysay14-Apr-03 23:49
jeremysay14-Apr-03 23:49 
GeneralRe: How to draw a transparent circle? Pin
melwyn15-Apr-03 0:39
melwyn15-Apr-03 0:39 
GeneralDynamic Menus Pin
Dor14-Apr-03 23:22
Dor14-Apr-03 23:22 
GeneralRe: Dynamic Menus Pin
Roger Allen15-Apr-03 1:59
Roger Allen15-Apr-03 1:59 
If you have a menu, if its a popup menu, you can get t ereturn value at the time of the call like this:

int ret = TrackPopupMenuEx(pSub->m_hMenu, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_NONOTIFY | TPM_RETURNCMD, x, y, this->m_hWnd, NULL);
switch (ret)
{
case IDC_COMMAND1:
case IDC_ANOTHER_COMMAND:
}

The function returns 0 if the menu was cancelled. If its a top level menu, then I would recommend using a set range of menu iDs e.g. 10000 - 11000. You could them map the command using the ON_COMMAND_RANGE() macro for the message map.


Roger Allen
Sonork 100.10016

Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
GeneralIntel C++ Compiler 7.0 Pin
Anonymous14-Apr-03 23:18
Anonymous14-Apr-03 23:18 
GeneralRe: Intel C++ Compiler 7.0 Pin
puzzolino15-Apr-03 0:00
puzzolino15-Apr-03 0:00 
GeneralRe: Intel C++ Compiler 7.0 Pin
markkuk15-Apr-03 0:48
markkuk15-Apr-03 0:48 
GeneralRe: Intel C++ Compiler 7.0 Pin
Olli15-Apr-03 0:10
Olli15-Apr-03 0:10 
GeneralRe: Intel C++ Compiler 7.0 Pin
Anonymous15-Apr-03 1:00
Anonymous15-Apr-03 1:00 
GeneralWord automation Pin
Exceter14-Apr-03 23:03
Exceter14-Apr-03 23:03 
GeneralRe: Word automation Pin
Rage15-Apr-03 0:46
professionalRage15-Apr-03 0:46 
GeneralRe: Word automation Pin
David Crow15-Apr-03 4:46
David Crow15-Apr-03 4:46 
GeneralMinimizing a dialog... Pin
puzzolino14-Apr-03 22:56
puzzolino14-Apr-03 22:56 
GeneralRe: Minimizing a dialog... Pin
Mike Dimmick15-Apr-03 2:52
Mike Dimmick15-Apr-03 2:52 
QuestionWhy should I Upgrade from VC++ 6? Pin
PatrickM14-Apr-03 22:33
PatrickM14-Apr-03 22:33 
AnswerRe: Why should I Upgrade from VC++ 6? Pin
jhwurmbach15-Apr-03 1:08
jhwurmbach15-Apr-03 1:08 
AnswerRe: Why should I Upgrade from VC++ 6? Pin
Brian Shifrin15-Apr-03 1:26
Brian Shifrin15-Apr-03 1:26 
GeneralRe: Why should I Upgrade from VC++ 6? Pin
Joan M15-Apr-03 3:52
professionalJoan M15-Apr-03 3:52 
GeneralRe: Why should I Upgrade from VC++ 6? Pin
Big Art15-Apr-03 6:36
Big Art15-Apr-03 6:36 
GeneralEmbedded Dialog in another Dialog Pin
Cedric Moonen14-Apr-03 21:14
Cedric Moonen14-Apr-03 21:14 
GeneralRe: Embedded Dialog in another Dialog Pin
peterchen14-Apr-03 21:49
peterchen14-Apr-03 21:49 

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.