Archived

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

trysil

Once again... (WIN32)

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
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