-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathAboutBox.cpp
More file actions
39 lines (34 loc) · 914 Bytes
/
AboutBox.cpp
File metadata and controls
39 lines (34 loc) · 914 Bytes
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
// AboutBox.cpp --- version info dialog
// Copyright (C) 2019 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
// This file is public domain software.
#include "AboutBox.hpp"
#include <windowsx.h>
#include "resource.h"
static BOOL OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)
{
return TRUE;
}
static void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
{
switch (id)
{
case IDOK:
case IDCANCEL:
EndDialog(hwnd, id);
break;
}
}
static INT_PTR CALLBACK
AboutBoxDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
HANDLE_MSG(hwnd, WM_INITDIALOG, OnInitDialog);
HANDLE_MSG(hwnd, WM_COMMAND, OnCommand);
}
return 0;
}
void ShowAboutBox(HINSTANCE hInst, HWND hwnd)
{
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, AboutBoxDialogProc);
}