Subj : Re: Create main window from dialog resource by using CreateWndowEx() function To : borland.public.cpp.borlandcpp From : "Gary Setter" Date : Sat Nov 01 2003 07:31 am "akuma" wrote in message news:3fa35459$1@newsgroups.borland.com... > Using DialogBox() to create dialog is a child window > of the main window. The Dialog Box function to > handle message is different from Windows Procedure. > > If I want a dialog resource to become a main window, > that is it can handle main window message as the > windows created by CreateWindow() function, > how to do that? > > Something like this? /* Entry point for this Windows program. */ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE , LPSTR , int ) { return DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN), 0, DialogProc); } Hope this helps, Gary http://home.att.net/~setterg .