Jump to content
  • Advertisement

Archived

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

Eber Kain

Putting WndProc into a class?

This topic is 6063 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

I cant get my program to compile if WndProc is in a class? this line (setting up the window class) wc.lpfnWndProc = WndProc; causes this error C:\Programming\Projects\msvc\OpenGL Helper Library\glh.cpp(151) : error C2440: ''='' : cannot convert from ''long (__stdcall glhs::*)(struct HWND__ *,unsigned int,unsigned int,long)'' to ''long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long

Share this post


Link to post
Share on other sites
Advertisement
Then the wndproc function and the function in your class are different in some way

Someone else will give you a better answer below:

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Then the wndproc function and the function in your class are different in some way

Someone else will give you a better answer below:

Share this post


Link to post
Share on other sites
well that worked, but now it acts like its not a member of the class.

It gives error on ever member variabe reference


I got a bypass to this problem, but makeing a dummy WndProc functions, and passing all its data to my WndProc class function.

LRESULT CALLBACK WndProc(HWND p_hwn,UINT p_msg,WPARAM p_wparam,LPARAM p_lparam) {
return glh.WProc(p_hwn, p_msg, p_wparam, p_lparam);
}

What sort of overhead would there be in something like this?

Edited by - Eber Kain on December 13, 2001 7:38:47 PM

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!