Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
The perfect example is Microsoft's own MDITabsDemo app.
All I want to know when user switches from one tab to another.
Thanks.
Posted
Comments
Sergey Alexandrovich Kryukov 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

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.
 
Share this answer
 
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900