rendered paste bodyLRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
/* ... */
default:
return DefWindowProc(hwnd, msg, wParam, lParam);
}
return 0;
}
INT WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
/* ... */
HICON hIcon;
hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MYICON));
SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
hIcon = LoadIcon(NULL, IDI_APPLICATION);
SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
/* ... */
}