1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nCmdShow)
{
HWND MainWindow;
MSG messages;
WNDCLASSEX winclass;
winclass = CreateWindowClass (winclass, hThisInstance);
RegisterClassEx (&winclass);
/*Creating MAIN windows*/
MainWindow = CreateWindowEx (
0, /* Extended possibilities for variation */
"Main Class" | TOOLBARCLASSNAME, /* Classname */
"My Awesome Window!", /* Title Text */
WS_OVERLAPPEDWINDOW | /* Window Styles */
WS_HSCROLL | WS_VSCROLL
| TBSTYLE_WRAPABLE, /*HERE IS THE ERROR */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
CW_USEDEFAULT, /* The programs width */
CW_USEDEFAULT, /* and height in pixels */
HWND_DESKTOP, /* The window is a child-window to desktop */
NULL, /* No menu */
hThisInstance, /* Program Instance handler */
NULL /* No Window Creation data */
);
ShowWindow (MainWindow, nCmdShow);
while (GetMessage (&messages, NULL, 0, 0))
{
TranslateMessage(&messages);
DispatchMessage(&messages);
}
return messages.wParam;
}
|