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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
void AboutBox(HWND hwnd)
{
HWND hwnd_child;
hwnd_child = CreateWindow(ChildWindowClass, AboutWindowTitle, WS_CHILD | WS_VISIBLE | WS_CAPTION, 175, 100, 375, 200, hwnd, (HMENU)ABOUT_OK, hInstance, NULL);
if (!hwnd_child)
{
MessageBox(NULL, L"Call to CreateWindow failed!", AboutWindowTitle, NULL);
return;
}
CreateWindow(L"BUTTON", L"OK", WS_VISIBLE | WS_CHILD, 138, 110, 80, 25, hwnd_child, (HMENU)BUTTON_OK, hInstance, NULL);
}
LRESULT CALLBACK AboutProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
RECT rect;
HDC hdc_child;
switch (message)
{
case WM_COMMAND:
switch (LOWORD(wParam))
{
case BUTTON_OK:
DestroyWindow(hwnd);
break;
}
break;
case WM_PAINT:
hdc_child = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &rect);
DrawTextW(hdc_child, L"\n\n\n\u00a92021 Lookout Portable Security\nVersion 1.0\n9/8/2021\n", -1, &rect, DT_CENTER);
EndPaint(hwnd, &ps);
return(0);
}
return DefWindowProc(hwnd, message, wParam, lParam);
}
|