Sign in to follow this  

wndproc - accessing members

This topic is 4815 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 everyone, this is my first post on GameDev.net. I know C/C++, and some x86 Assembler. I'm creating a simple Pong game (using OOP), and I have a little question (Win32 / C++). I put the wnd proc in a class, and noticed that I cant access any members of the class. eg;
[SOURCE]
// in _CMain::WndProc

  case WM_PAINT:
  {
    ...
    RenderFrame (hdc); // why doesn't this work?
    ...
  }
[/SOURCE]
The above should call _CMain::RenderFrame (), except I'm getting an error from my compiler (must use . or -> to access this etc..) I'm guessing this has to do with the wnd proc beig static, but is there any way around this? Thanks;

Share this post


Link to post
Share on other sites

This topic is 4815 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this