CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #3
    Join Date
    Oct 2002
    Posts
    359
    well,I made mistake.

    Actually I use a derived CMyTabCtrl class from CTabCtrl. The CMyTabCtrl is supposed to intercept the WM_SELCHANGE message first, (I checked that it did receive it), and in that handler CMyTabCtrl post a WM_NOTFIY message to the GetParent(), using

    CWnd *pWnd=GetParent();
    pNMHDR->code=TVN_SELCHANGE;
    pWnd->PostMessage(WM_NOTIFY,0,(LPARAM)pNMHDR);

    BTW, in the CMyTabCtrl , ON_NOTIFY_REFLECT is used to map messages and in parent window ON_NOTIFY is used.

    But, all these work well in a debug version.


    At last,I found that the main dialog did receive the WM_NOTIFY but it did not dispatch to the right handler.

    How does windows dispatch WM_NOTIFY? In other words, what should be in PostMessage()? I all tried

    pWnd->PostMessage(WM_NOTIFY,GetDlgCtrlID(),(LPARAM)pNMHDR);

    It did not work either.
    Last edited by caperover2002; January 2nd, 2003 at 11:50 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured