Fastian
06-24-2001, 10:14 PM
Hi,
I register a WNDCLASS object before creating an OpenGL window. It works... everything is fine, opengl is drawn....
Then I want to create another dialog window so I again register this object with some different properties and different class name and now....OpenGL is no longer displayed in the actual Window... Am I missing something here... What am I doing wrong... can someone help???
heres the code snapshot...:
WNDCLASS WndClass;
// actual OpenGL Window class.
WndClass.style = CS_VREDRAW | CS_HREDRAW | CS_OWNDC ;
WndClass.cbClsExtra = 0;
WndClass.cbWndExtra = 0;
WndClass.hInstance = hInstance;
WndClass.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_AUTOPIPE);
WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
WndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
WndClass.lpszMenuName = 0;
WndClass.lpszClassName = "OpenGL";
// WndClass.lpfnWndProc = InitAppWndProc;
WndClass.lpfnWndProc = DefWindowProc;
status = RegisterClass(&WndClass);
// Dialog window class
// this is where the trouble starts
WndClass.style = CS_DBLCLKS;
WndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
WndClass.lpszClassName = _appClasses[0];
status = RegisterClass(&WndClass);
[This message has been edited by Fastian (edited 06-25-2001).]
[This message has been edited by Fastian (edited 06-25-2001).]
[This message has been edited by Fastian (edited 06-25-2001).]
I register a WNDCLASS object before creating an OpenGL window. It works... everything is fine, opengl is drawn....
Then I want to create another dialog window so I again register this object with some different properties and different class name and now....OpenGL is no longer displayed in the actual Window... Am I missing something here... What am I doing wrong... can someone help???
heres the code snapshot...:
WNDCLASS WndClass;
// actual OpenGL Window class.
WndClass.style = CS_VREDRAW | CS_HREDRAW | CS_OWNDC ;
WndClass.cbClsExtra = 0;
WndClass.cbWndExtra = 0;
WndClass.hInstance = hInstance;
WndClass.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_AUTOPIPE);
WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
WndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
WndClass.lpszMenuName = 0;
WndClass.lpszClassName = "OpenGL";
// WndClass.lpfnWndProc = InitAppWndProc;
WndClass.lpfnWndProc = DefWindowProc;
status = RegisterClass(&WndClass);
// Dialog window class
// this is where the trouble starts
WndClass.style = CS_DBLCLKS;
WndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
WndClass.lpszClassName = _appClasses[0];
status = RegisterClass(&WndClass);
[This message has been edited by Fastian (edited 06-25-2001).]
[This message has been edited by Fastian (edited 06-25-2001).]
[This message has been edited by Fastian (edited 06-25-2001).]