The TCM_SETCURSEL message selects a tab in a tab control. You can send this message explicitly or by using the TabCtrl_SetCurSel macro.
TCM_SETCURSEL
wParam = (WPARAM) (int) iItem; // index of the tab to select
lParam = 0; // not used; must be zero
Parameters
iItem
Index of the tab to select.
Return Values
Returns the index of the previously selected tab if successful or - 1 otherwise.
Remarks
A tab control does not send a TCN_SELCHANGING or TCN_SELCHANGE notification message when a tab is selected using this message.
See Also