InitCommonControls(); | // Initialize common controls - command bar | |
hInst = hInstance; | // Save handle to create command bar | |
hWnd = CreateWindow(szAppName, | // Class | |
| szTitle, | // Title |
| WS_OVERLAPPED, | // Style |
| 100, | // |
| 50, | // |
| WINDOW_WIDTH/2, | // |
| WINDOW_HEIGHT/2, | // |
| NULL, | // Parent handle |
| NULL, | // Menu handle |
| hInstance, | // Instance handle |
| NULL); | // Creation |
ShowWindow(hWnd, SW_SHOW);
UpdateWindow(hWnd);
while ( GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return(msg.wParam);
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM uParam, LPARAM lParam )
{
HDChdc; PAINTSTRUCT ps;
RECTrect;
DWORD ThreadID;
switch (message)
{
case WM_CREATE:
sndPlaySound(TEXT("OpenProg"), SND_NODEFAULT SND_ASYNC);
hWndCB = CommandBar_Create(hInst, hWnd, 1); CommandBar_AddAdornments( hWndCB, 0L, 0L); return 0;
39