Jump to content
  • Advertisement

Archived

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

trysil

Once again... (WIN32)

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

For some reason SetWindowLong returns with a error : "the parameter is incorrect" according to GetLastError() The code snippet:
  
		case WM_CREATE:			// window creation

		{
			HINSTANCE hInst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE);
			glWindow = (teGLWindow*)(((LPCREATESTRUCT)lParam)->lpCreateParams);
		-->	SetWindowLong(hWnd, GWL_USERDATA, (LONG)glWindow);
			glWindow->hWnd = hWnd;
			return glWindow->createGLWindow();
		}
  
this is from the WinProc function. Why?

Share this post


Link to post
Share on other sites
Advertisement
Assuming you''re using the same code from before, you need to be sure to set cbWndExtra in your WNDCLASS structure to some valid value other than 0.

Share this post


Link to post
Share on other sites
I tried a few values, but the question is what value it should have?
I'm a bit of a newbie with WIN32

The example I based this on didn't set the cbWndExtra. It was 0.



Edited by - trysil on February 7, 2002 3:19:38 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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!