Re: C++ Winapi - Tab Control
The documentation for TCM_SETCURSEL explicitly mentions that no TCN_SEL* WM_NOTIFY messages are sent. I suggest after sending the setcursel, check it's return value and if ok, just call the same function that you would call in response to TCN_SELCHANGE
Re: C++ Winapi - Tab Control
I go this to work....right now, it just changes the main window text to a number, but will eventually be changed to a name or something, easy change though.
Code:
//WM_CREATE:
CreateControls(hwnd);
char buffer[33];
if(count == 1){
SetWindowText(hwnd, itoa(1,buffer,10));
}
//WM_COMMAND - case id_FileNew:
CreateTabs(progTab);
char buffer[33];
int count = TabCtrl_GetItemCount(progTab);
if(count == count){
SetWindowText(hwnd, itoa(count,buffer,10));
}
//WM_NOTIFY - case TCN_SELCHANGE:
char buffer[33];
int count = TabCtrl_GetCurSel(progTab)+1;
SetWindowText(hwnd, itoa(count,buffer,10));