Click here to Skip to main content
Sign Up to vote bad
good
See more: MFCMDI
The perfect example is Microsoft's own MDITabsDemo app.
All I want to know when user switches from one tab to another.
Thanks.
Posted 16-Jun-12 8:34am

Comments
SAKryukov - 16-Jun-12 23:32pm
Not a question, and not clear what is your concern. There are many way the user selects tabs, but how is this related to the code you want to write? --SA

2 solutions

WM_NCACTIVATE[^] looks like a possibility. If you still cannot find out then get a copy of Spy++ which can trace all the messages for you.
  Permalink  
I tried WM_NCACTIVATE and some to no avail.
I decided to override OnCmdMsg and finally caught it. Message id is 0x0363 which is above 0x0360 = WM_AFXFIRST. This message is allocated to MFC.
OnCmdMsg gets an avalanche of hits (messages) and I have to monitor an active tab and if it differ from the last one.
I've been hoping somebody with an intimate knowledge of MFC internals helps me to process this message efficiently, and, particularly, the meaning of nID and nCode.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Christian Graus 544
1 Ron Beyer 296
2 OriginalGriff 258
3 samadhan_kshirsagar 229
4 Sergey Alexandrovich Kryukov 183
0 Sergey Alexandrovich Kryukov 7,007
1 Prasad_Kulkarni 3,815
2 OriginalGriff 3,557
3 _Amy 3,372
4 CPallini 2,975


Advertise | Privacy | Mobile
Web02 | 2.6.130617.1 | Last Updated 18 Jun 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid