Process commands from Tollbar and Menu 
Author Message
 Process commands from Tollbar and Menu

Override CFrameWnd::OnCmdMsg(). This method sends the command to view first.
Take a look at code in WINFRM.CPP and simply swap the order of routing.

Ajay

Quote:

>Hi All ,

>I create MDI app with several "view-document" pair.  I have need to process
>all command messages from toolbar an menu (such as "File Save" etc.) in
main
>window. But framework dispatch command at first to current active view, and
>main window  don't receive anything. How shall I change default dispatch of
>commands to active view and replace it by dispatch to main window ?

>Thanks in advance..
>Anton.



Sun, 30 Sep 2001 03:00:00 GMT  
 Process commands from Tollbar and Menu
Hi All ,

I create MDI app with several "view-document" pair.  I have need to process
all command messages from toolbar an menu (such as "File Save" etc.) in main
window. But framework dispatch command at first to current active view, and
main window  don't receive anything. How shall I change default dispatch of
commands to active view and replace it by dispatch to main window ?

Thanks in advance..
Anton.



Mon, 01 Oct 2001 03:00:00 GMT  
 Process commands from Tollbar and Menu

Quote:
>I create MDI app with several "view-document" pair.  I have need to process
>all command messages from toolbar an menu (such as "File Save" etc.) in main
>window. But framework dispatch command at first to current active view, and
>main window  don't receive anything.

Anton,

Are you handling the commands in one of the view or document classes?
I believed the messages would percolate down to the main frame window
provided you didn't handle them in the more specific classes.

Have you tried handling the messages in your main frame window's
PreTranslateMessage handler (though I don't think you should need to
do it there) ?

Dave
----
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Mon, 01 Oct 2001 03:00:00 GMT  
 Process commands from Tollbar and Menu
Override CFrameWnd::OnCmdMsg(). This method sends the command to view first.
Take a look at code in WINFRM.CPP and simply swap the order of routing.
Quote:

>Hi All ,

>I create MDI app with several "view-document" pair.  I have need to process
>all command messages from toolbar an menu (such as "File Save" etc.) in
main
>window. But framework dispatch command at first to current active view, and
>main window  don't receive anything. How shall I change default dispatch of
>commands to active view and replace it by dispatch to main window ?

>Thanks in advance..
>Anton.



Mon, 01 Oct 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Process commands from Tollbar and Menu

2. Process commands from Tollbar and Menu

3. Trapping Menu ID (command) and Grabbing Menu label in Doc/View

4. Process class problems with 16 bit DOS command.

5. command line processing

6. command line processing

7. server command was deadlocked with another process

8. command line processing

9. Trouble connecting visual studio 6.0 debugger to a running process compiled on the command line

10. Passing variable to command-line process

11. searching simple Commands (pause process, get Memory Use of LPSTR Strings

12. automating a command-line process

 

 
Powered by phpBB® Forum Software