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:34

Comments
SAKryukov - 16 Jun '12 - 23:32
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 Sergey Alexandrovich Kryukov 405
1 OriginalGriff 315
2 Maciej Los 240
3 Slacker007 240
4 Aarti Meswania 210
0 Sergey Alexandrovich Kryukov 8,953
1 OriginalGriff 7,134
2 CPallini 3,758
3 Rohan Leuva 3,036
4 Maciej Los 2,488


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