Jump to content
  • Advertisement


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


Can't use classes to create a window!

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

Hey, I''m building a map editor in win32, and everything is going along fine building it in C with a very procedural style. But, when I try to switch over to using classes I run into a big problem. Inside my WndProc, I need to access information that lies inside the window class. So far this has been impossible. Because the the proc is its own function, it can''t have access to the instance of the window class that i create in WinMain, and the only other way I can think of giving it access is by making it part of the class, which the compiler doesn''t like to much. This is the error i get when its part of the class... cannot convert from ''long (__stdcall CMainFrame::*)(struct HWND__ *,unsigned int,unsigned int,long)'' to ''long (__stdcall *) (struct HWND__ *,unsigned int,unsigned int,long)'' thanks for any help

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!