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


child window not being shown

Recommended Posts

The child window of my main window is not being shown. Here's the source:
// member of Window

WNDCLASS wndClass;

// in Window constructor			=CS_HREDRAW|CS_VREDRAW;
wndClass.cbClsExtra		=0;
wndClass.cbWndExtra		=0;
wndClass.hbrBackground	=(HBRUSH)(COLOR_WINDOW+1);
wndClass.hCursor		=(HCURSOR)LoadCursor(0,IDC_ARROW);
wndClass.hIcon			=(HICON)LoadIcon(0,IDI_APPLICATION);
wndClass.hInstance		=GetModuleHandle(0);
wndClass.lpfnWndProc	=Window::WndProc;
wndClass.lpszClassName	="Child Window";
wndClass.lpszMenuName	=0;

bool Window::create(HWND hwndParent,LPCTSTR windowName,int x,int y,int width,
						  int height,DWORD style)
	hwnd=CreateWindow("Child Window",windowName,style,x,y,width,height,
		return 0;
	return 1;
thx brassfish EDIT: also, I am going to use that WNDCLASS structure for all of my child windows, will that cause any errors once i start creating more than 1 child windows?
doh, nuts. Mmmm... donuts My website [edited by - brassfish89 on July 2, 2003 9:53:29 PM]

Share this post

Link to post
Share on other sites