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 )

{

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

Page 39
Image 39
Casio PA-2400W manual Wsoverlapped, WINDOWWIDTH/2, WINDOWHEIGHT/2, Null