Click to See Complete Forum and Search --> : Win32 child window


Bobbysl
February 11th, 2009, 11:32 AM
I've been doing some basic win32 programming. Just a simple window and a couple of buttons. Now i want to add a child window to my main window

SaveButton = CreateWindow("BUTTON","Save", WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,10, 10,80,20,m_hWnd,(HMENU)102,m_hInstance,NULL);


This is how i added a button. I should be able to add a window in the same way if i have defined the window in another file right???

Thanks

P.S. Hope the code tags work, haven't used it before

Bobbysl
February 11th, 2009, 11:48 AM
Ok i think i have figured it out, Child frames have to be defined differently. You have to use DefWindowProc() call to DefFrameProc() and things like that.
Sorry for wasting your time
I anyone else wants more information visit http://www.winprog.org/tutorial/app_four.html
Sorry again

Thu
February 12th, 2009, 05:50 AM
Someone new online I just caught via webcam said that child window is created with WS_CHILD alone only which sure will work. Don't go far into web site introduction. it might hurt the bathroom as always

yuenqi
February 13th, 2009, 04:36 AM
.......child window is created with WS_CHILD .....Very good Thu, always on the right track :)