1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM_CLOSE:
DestroyWindow(hwnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_PAINT:
{
PAINTSTRUCT ps;
HDC hdc = BeginPaint( hwnd, &ps );
TextOut( hdc, 75 /* X */, 0 /* Y */, "***IMPORTANT***", 15 /* Number of chars */);
TextOut( hdc, 0 /* X */, 30 /* Y */, "Do Not Close This Window", 30 /* Number of chars */);
TextOut( hdc, 0 /* X */, 60 /* Y */, "Press Delete Key To Turn Off Then Close", 40 /* Number of chars */);
EndPaint( hwnd, &ps );
}
break;
default:
return DefWindowProc(hwnd, msg, wParam, lParam);
}
return 0;
}
|