MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / DialogProc

Function DialogProc

src/windows/AboutDialog.cpp:4–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include "AboutDialog.hpp"
3
4static LRESULT CALLBACK DialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
5{
6 switch (uMsg)
7 {
8 case WM_INITDIALOG: {
9 std::string name = TmGetString(IDS_PROGRAM_NAME) + " " + GetAppVersionString();
10#ifdef IS_64_BIT
11 name += " (x64)";
12#endif
13 LPTSTR tstr = ConvertCppStringToTString(name);
14
15 SetDlgItemText(hWnd, IDC_PROGRAM_NAME, tstr);
16 free(tstr);
17 break;
18 }
19
20 case WM_COMMAND:
21 if (LOWORD(wParam) == IDOK) {
22 EndDialog(hWnd, LOWORD(wParam));
23 return TRUE;
24 }
25
26 break;
27 case WM_CLOSE:
28 EndDialog(hWnd, IDCANCEL);
29 return TRUE;
30 }
31
32 return 0L;
33}
34
35void About()
36{

Callers

nothing calls this directly

Calls 2

GetAppVersionStringFunction · 0.85

Tested by

no test coverage detected