Jump to content
  • Advertisement

Archived

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

hajkr

Pointer to Member-function...

This topic is 6128 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
Advertisement
Previous threads on this topic:
Message handler can be wrapped?
Windows
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."

Reference:
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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!