• Advertisement


This topic is now archived and is closed to further replies.

Pointer to Member-function...

This topic is 5908 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, I want to have a function-pointer to a funtion that is defined in a class: class a { private: LRESULT CALLBACK InternalMainWndProc( HWND hWnd, unsigned uMsg, WPARAM wParam, LPARAM lParam ); }; I can''t compile it when i want to set set to function pointer, the copmpiler says he can''t convert the types, but i don''t want to use a static funtion, because and the instances of the class would all have the same statuic function, right? Does see anyone another way do solve this ?

Share this post

Link to post
Share on other sites
Previous threads on this topic:
Message handler can be wrapped?
C++ & Win32
Static Member Functions?
Event Handlers and Classes. Wrappers and stuff.
Having my Event Handler inside an object?
How do I turn my message procedure into a member function of a class?
Windows in a class
Class member as window callback function???
WindowProc in a class
Window handler in a class

And many more...

As you can see, this topic has been covered a ton of times. GameDev has a search tool exactly for this reason; it''s located in the upper-right corner just under the "GDSE" link, in between "faq" and "login." I got the above results by using the terms "window handler class."

Pointers to member functions, C++ FAQ Lite

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!

Share this post

Link to post
Share on other sites

  • Advertisement