Click to See Complete Forum and Search --> : using .rc for window created by createwindowex


cccccccc
November 19th, 2005, 07:58 AM
Hi there. I have a little resource problem in winapi.

I now how to use resources with .rc file to create f.e. buttons, text,... in the dialog window. Then in my winapi source I create DlgProc as a window procedure and winmain fction calling only return DialogBox(hIns, "rc name", NULL, DlgProc)... pretty easy way to create window (not clear window but dialog).
Most common way to create window is to use winmain and then fill up WNDCLASSEX structure, calling RegisterClassEx, and finally use CreateWindow(ex) to create "regular" window. At this point I know it is possilble to call CreateDialog instead of CreateWindow(ex) (as far as I know I have to write windclass.cbWndExtra=DLGWINDOWEXTRA). My question is, at this moment, can it be done by calling CreateWindow(ex) and still use resource file for adding f.e. buttons, texts...(like for dialogs)??? The reason I'm asking is that I wanna make button easy way in main window.
I hope U understand me.
Thx!

Cyril