Why can't my WndProc be in a class?

前端 未结 3 633
清酒与你
清酒与你 2021-02-05 18:29

This seems like it should be pretty straightforward. I have my class:

class Simple
{
public:
    LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA         


        
3条回答
  •  悲&欢浪女
    2021-02-05 19:30

    A pointer to a member function has an implicit first parameter of this, and so has a different signiture than a pointer to a 'free' function. See http://www.parashift.com/c++-faq-lite/fnptr-vs-memfnptr-types.html

提交回复
热议问题