Tab Controls in Win32

Started by
12 comments, last by darkchrono4 20 years, 4 months ago
There aren''t separate handles for each tab. You change what controls are displayed when you receive TCN_SELCHANGE.

Colin Jeanne | Invader''s Realm
Advertisement
I''m using a NMHDR struct in the WM_NOTIFY message so that I know when a tab has changed. I check the .code parameter to see if a tab has actually changed. I gather from MSDN that .idFrom is the ID of the actual tab that has focus. But when I try to get this info it always comes up as a zero when I switch tabs. Is there a little more that I''m supposed to do?
You are supposed to use TabCtrl_GetCurSel() to find out which tab is selected now.

Colin Jeanne | Invader''s Realm
Thanks! I got it figured out.

case WM_NOTIFY:     lpnmhdr = (LPNMHDR)lParam;     if (lpnmhdr->code == TCN_SELCHANGE)     {          i = TabCtrl_GetCurSel(g_hwndTab);		/* Update display for new tab */     }     return 0; 

This topic is closed to new replies.

Advertisement