Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to process and update GUI Pin
nrbracke15-Nov-07 11:32
nrbracke15-Nov-07 11:32 
AnswerRe: How to process and update GUI Pin
Mark Salsbery15-Nov-07 11:38
Mark Salsbery15-Nov-07 11:38 
GeneralRe: How to process and update GUI Pin
nrbracke17-Nov-07 12:44
nrbracke17-Nov-07 12:44 
GeneralRe: How to process and update GUI Pin
Mark Salsbery17-Nov-07 13:03
Mark Salsbery17-Nov-07 13:03 
QuestionHow to add menu to CListbox? Pin
Gofur Halmurat15-Nov-07 9:46
Gofur Halmurat15-Nov-07 9:46 
AnswerRe: How to add menu to CListbox? Pin
Mark Salsbery15-Nov-07 10:37
Mark Salsbery15-Nov-07 10:37 
GeneralRe: How to add menu to CListbox? Pin
Gofur Halmurat15-Nov-07 10:59
Gofur Halmurat15-Nov-07 10:59 
GeneralRe: How to add menu to CListbox? Pin
Mark Salsbery15-Nov-07 11:28
Mark Salsbery15-Nov-07 11:28 
Gofur Halmurat wrote:
I have the menus ID = IDR_MENU1, can i call it in the class? if so, how?


What did you try?? 

Take a look at TrackPopupMenu() in the PSDK or MSDN.

Here's one example:
CMenu popupmenu;
popupmenu.LoadMenu(IDR_MENU1);
...do some menu initialization if necessary...
int Command = (int)popupmenu.GetSubMenu(0)->TrackPopupMenu(TPM_RIGHTALIGN | TPM_BOTTOMALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD | TPM_NONOTIFY, point.x, point.y, this);
...process the command...
You can also use an appropriate window and catch the command message the normal MFC way.
You'd have to remove the TPM_RETURNCMD and TPM_NONOTIFY flags.

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: How to add menu to CListbox? Pin
Gofur Halmurat16-Nov-07 6:18
Gofur Halmurat16-Nov-07 6:18 
GeneralRe: How to add menu to CListbox? Pin
Mark Salsbery16-Nov-07 6:22
Mark Salsbery16-Nov-07 6:22 
GeneralRe: How to add menu to CListbox? Pin
Mark Salsbery16-Nov-07 6:25
Mark Salsbery16-Nov-07 6:25 
GeneralRe: How to add menu to CListbox? Pin
Gofur Halmurat16-Nov-07 7:01
Gofur Halmurat16-Nov-07 7:01 
GeneralRe: How to add menu to CListbox? Pin
Gofur Halmurat17-Nov-07 6:04
Gofur Halmurat17-Nov-07 6:04 
GeneralRe: How to add menu to CListbox? Pin
Gofur Halmurat17-Nov-07 11:44
Gofur Halmurat17-Nov-07 11:44 
GeneralRe: How to add menu to CListbox? Pin
Mark Salsbery17-Nov-07 13:05
Mark Salsbery17-Nov-07 13:05 
Questionsort numbers with its index Pin
sarojsigdel15-Nov-07 9:41
sarojsigdel15-Nov-07 9:41 
AnswerRe: sort numbers with its index Pin
George L. Jackson15-Nov-07 12:29
George L. Jackson15-Nov-07 12:29 
GeneralRe: sort numbers with its index Pin
George L. Jackson15-Nov-07 13:20
George L. Jackson15-Nov-07 13:20 
GeneralRe: sort numbers with its index Pin
toxcct15-Nov-07 21:17
toxcct15-Nov-07 21:17 
GeneralRe: sort numbers with its index Pin
George L. Jackson16-Nov-07 1:07
George L. Jackson16-Nov-07 1:07 
GeneralRe: sort numbers with its index Pin
toxcct16-Nov-07 1:28
toxcct16-Nov-07 1:28 
GeneralRe: sort numbers with its index Pin
George L. Jackson16-Nov-07 1:42
George L. Jackson16-Nov-07 1:42 
AnswerRe: sort numbers with its index Pin
George L. Jackson15-Nov-07 16:15
George L. Jackson15-Nov-07 16:15 
AnswerRe: sort numbers with its index Pin
chandu00415-Nov-07 19:20
chandu00415-Nov-07 19:20 
QuestionHow to sign a C++ client of .NET component? [modified] Pin
Vitaly Tomilov15-Nov-07 7:32
Vitaly Tomilov15-Nov-07 7:32 

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.