Quote Originally Posted by MrViggy View Post
If I remember my messaging correctly (it's been a while since i played with this stuff), you recieve the WM_NOTIFY message *before* the tab actually changes. So, at the time you get the message, "GetCurSel()" will not return the tab you are switching to.

Why not just check that you are getting the TCN_SELCHANGE message?

Viggy

PS. You can also stick a conditional breakpoint on your "if" line, so that it only breaks if "p->idCode == TAB5_ID". Then you can see what the currently selected tab is, to verify my statement.
Thank you, it works now.