Click here to Skip to main content
15,908,776 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: TVN_SELCHANGED problems Pin
David Crow12-Nov-03 7:21
David Crow12-Nov-03 7:21 
GeneralRe: TVN_SELCHANGED problems Pin
Roger Allen12-Nov-03 7:26
Roger Allen12-Nov-03 7:26 
GeneralRe: TVN_SELCHANGED problems Pin
LukeV12-Nov-03 7:43
LukeV12-Nov-03 7:43 
GeneralRe: TVN_SELCHANGED problems Pin
LukeV12-Nov-03 7:39
LukeV12-Nov-03 7:39 
GeneralRe: TVN_SELCHANGED problems Pin
David Crow12-Nov-03 8:00
David Crow12-Nov-03 8:00 
GeneralRe: TVN_SELCHANGED problems Pin
LukeV12-Nov-03 8:10
LukeV12-Nov-03 8:10 
GeneralDynamically-built Menus Pin
Sean Payne12-Nov-03 6:22
professionalSean Payne12-Nov-03 6:22 
GeneralRe: Dynamically-built Menus Pin
Roger Allen12-Nov-03 7:23
Roger Allen12-Nov-03 7:23 
If you use TrackPopupMenu to display it, use the TPM_RETURNCMD flag so that the selected option code is returned locally to the procedure that calls TrackPopupMenu() (i.e. not a WM_COMMAND message sent to you). If its one you recognise, you porcess it locally, else you have to check each of your plug-ins to see if they are the one to handle it.

Similary, your plug-ins will have a procedure to setup the dynamic menu, something like this:

CMenu menu;

menu.CreatePopupMenu(); // or use LoadMenu and GetSubMenu(0)

menu.AppendMenu(...) ; // add local commands

for each plug-in
{
plugin.AddMenuItems(menu);
}

int sel = TrackPopupMenu(menu, TPM_RETURNCMD, ...)

switch (sel)
{
case 0:
// aborted
break;
case MY_COMMAND1:
...
case MY_COMMANDX:
break;
default:
// command added by plug-in, check the plugins to see who needs to handle it
}

A quick pseudo code hack above, but should give you the idea.

Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
GeneralRe: Dynamically-built Menus Pin
Zero_divide_113-Nov-03 16:30
Zero_divide_113-Nov-03 16:30 
General_com_dispatch_method undefied Pin
Rene De La Garza12-Nov-03 5:58
Rene De La Garza12-Nov-03 5:58 
GeneralRe: _com_dispatch_method undefied Pin
Peter Molnar12-Nov-03 13:10
Peter Molnar12-Nov-03 13:10 
GeneralRe: _com_dispatch_method undefied Pin
Rene De La Garza12-Nov-03 13:12
Rene De La Garza12-Nov-03 13:12 
GeneralRe: _com_dispatch_method undefied Pin
Peter Molnar12-Nov-03 13:21
Peter Molnar12-Nov-03 13:21 
GeneralRe: _com_dispatch_method undefied Pin
Rene De La Garza12-Nov-03 13:22
Rene De La Garza12-Nov-03 13:22 
GeneralRe: _com_dispatch_method undefied Pin
Peter Molnar12-Nov-03 13:24
Peter Molnar12-Nov-03 13:24 
GeneralRe: _com_dispatch_method undefied Pin
Rene De La Garza12-Nov-03 13:30
Rene De La Garza12-Nov-03 13:30 
GeneralRe: _com_dispatch_method undefied Pin
Peter Molnar12-Nov-03 13:37
Peter Molnar12-Nov-03 13:37 
GeneralRe: _com_dispatch_method undefied Pin
Rene De La Garza12-Nov-03 13:39
Rene De La Garza12-Nov-03 13:39 
GeneralRe: _com_dispatch_method undefied Pin
Peter Molnar12-Nov-03 13:41
Peter Molnar12-Nov-03 13:41 
GeneralRe: _com_dispatch_method undefied Pin
Rene De La Garza12-Nov-03 13:43
Rene De La Garza12-Nov-03 13:43 
GeneralRe: _com_dispatch_method undefied Pin
Rene De La Garza17-Nov-03 10:09
Rene De La Garza17-Nov-03 10:09 
GeneralMore environment var madness Pin
Jim Crafton12-Nov-03 5:45
Jim Crafton12-Nov-03 5:45 
GeneralRe: More environment var madness Pin
David Crow12-Nov-03 7:05
David Crow12-Nov-03 7:05 
GeneralRe: More environment var madness Pin
Jim Crafton12-Nov-03 7:41
Jim Crafton12-Nov-03 7:41 
GeneralRe: More environment var madness Pin
David Crow12-Nov-03 8:38
David Crow12-Nov-03 8:38 

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.