我点击控件上的标签,在父窗口的消息处理函数里收到了3个WM_NOTIFY通知,可是参数wParam都是0,为什么没有TCN_SELCHANGE? case WM_NOTIFY: 
switch ((int)wParam) 

case TCN_SELCHANGE: 

int iPage = TabCtrl_GetCurSel(g_hwndTab); 
LoadString(g_hinst, IDS_FIRSTDAY + iPage, 
g_achTemp,
sizeof(g_achTemp)/sizeof(g_achTemp[0])); 
SendMessage(g_hwndDisplay, WM_SETTEXT, 0,
(LPARAM) g_achTemp); 

break; 
default:
{
TCHAR sz[20];
sprintf(sz,"%u\n",wParam);
OutputDebugString(sz);
}
break;

break;

解决方案 »

  1.   

    The WM_NOTIFY message is sent by a common control to its parent window when an event has occurred or the control requires some information. WM_NOTIFY 
        idCtrl = (int) wParam; 
        pnmh = (LPNMHDR) lParam; TCN_SELCHANGE
    Notifies a tab control's parent window that the currently selected tab has changed. This message is sent in the form of a WM_NOTIFY message. TCN_SELCHANGE 
        lpnmhdr = (LPNMHDR) lParam;