How do I call SetWindowLong() in the 64-bit versions of Windows?

后端 未结 3 1388
夕颜
夕颜 2021-02-18 16:55

In the header file WinUser.h, there is a part in which the constants of the second parameter of SetWindowLong() are defined.

// ...

#define GWL_WNDP         


        
3条回答
  •  青春惊慌失措
    2021-02-18 17:19

        As specified in 
        //If config is _WIN64 then use new versioned macro
    
        #define GWLP_WNDPROC        (-4)
        #define GWLP_HINSTANCE      (-6)
        #define GWLP_HWNDPARENT     (-8)
        #define GWLP_USERDATA       (-21)
        #define GWLP_ID             (-12)
    
        //else for _WIN32
    
        #undef GWL_WNDPROC
        #undef GWL_HINSTANCE
        #undef GWL_HWNDPARENT
        #undef GWL_USERDATA
    

提交回复
热议问题