GetWindowLong(handle,0)
第二个参数设为0是什么意思

解决方案 »

  1.   

    LONG GetWindowLong(
      HWND hWnd,  // handle of window
      int nIndex  // offset of value to retrieve
    );
    nIndex 
    Specifies the zero-based offset to the value to be retrieved. Valid values are in the range zero through the number of bytes of extra window memory, minus four; for example, if you specified 12 or more bytes of extra memory, a value of 8 would be an index to the third 32-bit integer. To retrieve any other value, specify one of the following values: Value Action 
    GWL_EXSTYLE Retrieves the extended window styles. 
    GWL_STYLE Retrieves the window styles. 
    GWL_WNDPROC Retrieves the address of the window procedure, or a handle representing the address of the window procedure. You must use the CallWindowProc function to call the window procedure. 
    GWL_HINSTANCE Retrieves the handle of the application instance. 
    GWL_HWNDPARENT Retrieves the handle of the parent window, if any. 
    GWL_ID Retrieves the identifier of the window. 
    GWL_USERDATA Retrieves the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window. 
    The following values are also available when the hWnd parameter identifies a dialog box: Value Action 
    DWL_DLGPROC Retrieves the address of the dialog box procedure, or a handle representing the address of the dialog box procedure. You must use the CallWindowProc function to call the dialog box procedure. 
    DWL_MSGRESULT Retrieves the return value of a message processed in the dialog box procedure. 
    DWL_USER Retrieves extra information private to the application, such as handles or pointers. 
      

  2.   

    DWL_MSGRESULT代表0
    即0的意思是:
    Retrieves the return value of a message processed in the dialog box procedure.
      

  3.   

    建议楼主装MSDN,很多问题都有详细说明.