MFC 4.x 適時地為我們註冊Windows 視窗類別(在
第一次產生該種型式之視窗之前)。這些個Windows 視窗類別的視窗函式各是「視窗所
對應之C++ 類別中的DefWindowProc 成員函式」
AfxEndDeferRegisterClass中是这样的
wndcls.lpfnWndProc = DefWindowProc;
而且WNDCLASS的lpfnWndProc不可能指向一个带this的成员函数啊

解决方案 »

  1.   

    lpfnWndProc
        Pointer to the window procedure. You must use the CallWindowProc function to call the window procedure.The WindowProc function is an application-defined function that processes messages sent to a window. The WNDPROC type defines a pointer to this callback function. WindowProc is a placeholder for the application-defined function name. SyntaxLRESULT CALLBACK WindowProc(HWND hwnd,
        UINT uMsg,
        WPARAM wParam,
        LPARAM lParam
    );
    Parametershwnd
    [in] Handle to the window. 
    uMsg
    [in] Specifies the message. 
    wParam
    [in] Specifies additional message information. The contents of this parameter depend on the value of the uMsg parameter. 
    lParam
    [in] Specifies additional message information. The contents of this parameter depend on the value of the uMsg parameter. 
    Return ValueThe return value is the result of the message processing and depends on the message sent.注:【深入浅出】这个成语的意思是:对内容的理解十分深刻,表达却浅显易懂。
      

  2.   

    AfxEndDeferRegisterClass不是成员函数,那么其中的
    wndcls.lpfnWndProc = DefWindowProc;应该就是SDK中的那个DefWindowProc吧
    这样书上不就不对了吗?CWnd::DefWindowProc是个虚函数