I'm trying to make my own low poly modeller with OpenGL and I need to have 1 or more child windows (the viewports). Below is what I have so far (which is not working at all, ie: no child window is displayed).:
Code:
case WM_CREATE:
{
WNDCLASSEX wcx;
wcx.cbSize=sizeof(WNDCLASSEX);
wcx.style=CS_OWNDC | CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;
wcx.lpfnWndProc=MsgHndlr;
wcx.cbClsExtra=0;
wcx.cbWndExtra=0;
wcx.hInstance=g_hInst;
wcx.hIcon=NULL;
wcx.hCursor=NULL;
wcx.hbrBackground=(HBRUSH)GetStockObject(BLACK_BRUSH);
wcx.lpszMenuName=NULL;
wcx.lpszClassName="Mini";
wcx.hIconSm=NULL;
RegisterClassEx(&wcx);
g_hChild=CreateWindowEx(WS_EX_CLIENTEDGE,"Mini","",WS_CHILD,20,20,80,80,g_hWnd,NULL,g_hInst,NULL);
return(0);
}break;
I've used child windows before in the form of buttons, listboxes, etc. but never just a plain child window.
My intention is to have a seperate HDC and HGLRC to go with each window.
I'm pretty sure it just has something to do with me being clueless as to how to create a regular child window, but I've searched MSDN, Google and the boards and all that I've found was stuff relevant to controls (buttons, edits, etc) and MFC.
Thanks in advance for any help.
Jason