beautypg.com

Casio PA-2400W User Manual

Page 39

background image

39

InitCommonControls(); // Initialize common controls - command bar

hInst = hInstance; // Save handle to create command bar

hWnd = CreateWindow(szAppName, // Class

szTitle, // Title

WS_OVERLAPPED, // Style
100, // x-position

50, // y-position

WINDOW_WIDTH/2, // x-size

WINDOW_HEIGHT/2, // y-size
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 )

{

HDC hdc;

PAINTSTRUCT ps;

RECT rect;

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;