beautypg.com

Casio Cassiopeia PA-2400 User Manual

Page 12

background image

12

wc.cbWndExtra = 0;

wc.hInstance = hInstance;

wc.hIcon = NULL;

wc.hCursor = NULL;

wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);

wc.lpszMenuName = NULL;

wc.lpszClassName = szAppName;

RegisterClass(&wc);

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 )