Win32 WndProc as class member

前端 未结 3 1070
野的像风
野的像风 2021-01-22 06:58

Is there a way to wrap WndProc as private member?

If I have this:

class Window
{
public:
    Window();
    virtual ~Window();
    void create();

private         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-22 07:19

    Yes, it is possible to include a WndProc as a class member. Furthermore, you can modify other class members from it. The trick is to use two WndProc functions, one of them static.

提交回复
热议问题