Click here to Skip to main content
16,005,048 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSendMessage() and CFormView::OnFilePrint() Pin
dazinith21-May-02 8:14
dazinith21-May-02 8:14 
GeneralRe: SendMessage() and CFormView::OnFilePrint() Pin
Joaquín M López Muñoz21-May-02 8:25
Joaquín M López Muñoz21-May-02 8:25 
GeneralRe: SendMessage() and CFormView::OnFilePrint() Pin
dazinith21-May-02 9:21
dazinith21-May-02 9:21 
GeneralRe: SendMessage() and CFormView::OnFilePrint() Pin
Joaquín M López Muñoz21-May-02 9:27
Joaquín M López Muñoz21-May-02 9:27 
GeneralRe: SendMessage() and CFormView::OnFilePrint() Pin
dazinith21-May-02 9:54
dazinith21-May-02 9:54 
GeneralRe: SendMessage() and CFormView::OnFilePrint() Pin
Joaquín M López Muñoz21-May-02 11:16
Joaquín M López Muñoz21-May-02 11:16 
GeneralRe: SendMessage() and CFormView::OnFilePrint() Pin
Philip Patrick21-May-02 8:36
professionalPhilip Patrick21-May-02 8:36 
GeneralRe: SendMessage() and CFormView::OnFilePrint() Pin
Jonathan Craig21-May-02 9:44
Jonathan Craig21-May-02 9:44 
I have seen a lot of people post questions about problems sending messages to splitter windows. The problem is the frame and CSplitterWnd are not routing the message all the way down to the CView panes. Refer to the MSDN article "September 1998 Microsoft System Journal, Q&A". Just search for CSpliterWnd and it will be in the list.

This is the meat of what it says:

"... Fortunately, it's easy to let all the views in a splitter window handle commands. All you have to do is override your frame's OnCmdMsg function, like so:
 BOOL CMainFrame::OnCmdMsg(/*args*/)
{
     // pass command to splitter window
     if (m_wndSplitter.OnCmdMsg(/*args*/)
         return TRUE;
     return CFrameWnd::OnCmdMsg(/*args*/);
}
Then, override the splitter window's OnCmdMsg:
BOOL CMySplitterWnd::OnCmdMsg(/*args*/)
{
     for (pView = /*each pane*/) {
     if (pView->OnCmdMsg(/*args*/)
         return TRUE;
     }
     return CSplitterWnd::OnCmdMsg(/*args*/);
}
..."

Note you should override CSplitterWnd. And the changes to the frame is to CMainFrame for a SDI application and to CChildFrame for a MDI application.

Hope this helps Smile | :)

Jonathan Craig
www.mcw-tech.com
GeneralAmout of memory used by a process Pin
Prem Kumar21-May-02 7:32
Prem Kumar21-May-02 7:32 
GeneralRe: Amout of memory used by a process Pin
Philip Patrick21-May-02 8:38
professionalPhilip Patrick21-May-02 8:38 
GeneralRe: Amout of memory used by a process Pin
Joaquín M López Muñoz21-May-02 9:01
Joaquín M López Muñoz21-May-02 9:01 
GeneralRe: Amout of memory used by a process Pin
Prem Kumar21-May-02 9:19
Prem Kumar21-May-02 9:19 
GeneralRe: Amout of memory used by a process Pin
Joaquín M López Muñoz21-May-02 9:32
Joaquín M López Muñoz21-May-02 9:32 
GeneralRe: Amout of memory used by a process Pin
Prem Kumar21-May-02 10:58
Prem Kumar21-May-02 10:58 
GeneralRe: Amout of memory used by a process Pin
Rickard Andersson2021-May-02 8:57
Rickard Andersson2021-May-02 8:57 
GeneralRe: Amout of memory used by a process Pin
Joaquín M López Muñoz21-May-02 9:21
Joaquín M López Muñoz21-May-02 9:21 
GeneralRe: Amout of memory used by a process Pin
Rickard Andersson2021-May-02 10:50
Rickard Andersson2021-May-02 10:50 
GeneralRe: Amout of memory used by a process Pin
Joaquín M López Muñoz21-May-02 11:20
Joaquín M López Muñoz21-May-02 11:20 
GeneralRe: Amout of memory used by a process Pin
Prem Kumar21-May-02 10:53
Prem Kumar21-May-02 10:53 
QuestionATL Web Server return values question? Pin
Ollie21-May-02 7:09
Ollie21-May-02 7:09 
AnswerRe: ATL Web Server return values question? Pin
Philip Patrick21-May-02 7:21
professionalPhilip Patrick21-May-02 7:21 
GeneralRe: ATL Web Server return values question? Pin
Ollie21-May-02 7:20
Ollie21-May-02 7:20 
GeneralDebug Assertion Fail Pin
tongc21-May-02 7:12
tongc21-May-02 7:12 
GeneralRe: Debug Assertion Fail Pin
Tim Smith21-May-02 7:17
Tim Smith21-May-02 7:17 
GeneralRe: Debug Assertion Fail Pin
Philip Patrick21-May-02 7:17
professionalPhilip Patrick21-May-02 7:17 

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.