Best method for storing this pointer for use in WndProc

前端 未结 10 811
南旧
南旧 2020-11-29 20:06

I\'m interested to know the best / common way of storing a this pointer for use in the WndProc. I know of several approaches, but each as I underst

10条回答
  •  [愿得一人]
    2020-11-29 20:22

    In order to prevent the problem that occurred in the Zeus editor, simply specify the window in the GetMessage function:

    BOOL GetMessage(
    LPMSG lpMsg,
    HWND  hWnd, /*A handle to the window whose messages are to be retrieved.*/
    UINT  wMsgFilterMin,
    UINT  wMsgFilterMax
    );
    

    NOTE The window must belong to the current thread.

    Easy to read Documentation of the function

提交回复
热议问题