опубликован 29-07-2001 23:18 MSK
Запускаешь VC. Выбираешь Menu->File->New... вкладка projects, Win32 Application. Дальше выбираешь "A tupical "Hello word..." жмёшь Finish, и начинаешь разбирать код начиная с WinMain(...). Он там только тем и занимается,что окно создаёт.Ну а вообще в общем случае:
HWND CreateWindowEx(
DWORD dwExStyle, // extended window style
LPCTSTR lpClassName, // registered class name
LPCTSTR lpWindowName, // window name
DWORD dwStyle, // window style
int x, // horizontal position of window
int y, // vertical position of window
int nWidth, // window width
int nHeight, // window height
HWND hWndParent, // handle to parent or owner window
HMENU hMenu, // menu handle or child identifier
HINSTANCE hInstance, // handle to application instance
LPVOID lpParam // window-creation data
);
А для диалога:
INT_PTR DialogBox(
HINSTANCE hInstance, // handle to module
LPCTSTR lpTemplate, // dialog box template
HWND hWndParent, // handle to owner window
DLGPROC lpDialogFunc // dialog box procedure
);
MSDN -- rules! :-))