Add About dialog and version info
This commit is contained in:
parent
081eb00a46
commit
89c76d0a9c
@ -1,6 +1,7 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "src/resource.h"
|
||||
#include "version.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -87,6 +88,42 @@ BEGIN
|
||||
0
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x0L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Grayson Riffe"
|
||||
VALUE "FileDescription", "Watchful Eye"
|
||||
VALUE "InternalName", "WatchfulEye"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2026"
|
||||
VALUE "OriginalFilename", "WatchfulEye.exe"
|
||||
VALUE "ProductName", "Watchful Eye"
|
||||
VALUE "ProductVersion", APPVERSION
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // English (United States) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@ -6,7 +6,8 @@
|
||||
#include "resource.h"
|
||||
|
||||
#define WM_TRAYICON WM_USER // Tray icon window message
|
||||
#define IDM_EXIT 1001 // "Exit" menu identifier
|
||||
#define IDM_ABOUT 1001 // "About" menu identifier
|
||||
#define IDM_EXIT 1002 // "Exit" menu identifier
|
||||
#define IDT_UPDATE 1 // Update timer identifier
|
||||
#define WM_UPDATE WM_USER + 1 // Update window message
|
||||
|
||||
@ -97,6 +98,7 @@ namespace watchfuleye {
|
||||
GetCursorPos(&cursor);
|
||||
|
||||
HMENU popupMenu = CreatePopupMenu();
|
||||
AppendMenu(popupMenu, MF_STRING, IDM_ABOUT, "About");
|
||||
AppendMenu(popupMenu, MF_STRING, IDM_EXIT, "Exit");
|
||||
|
||||
TrackPopupMenu(popupMenu, NULL, cursor.x, cursor.y, NULL, dlg, nullptr); // Will block here. Might be problematic.
|
||||
@ -108,7 +110,14 @@ namespace watchfuleye {
|
||||
}
|
||||
|
||||
case WM_COMMAND: {
|
||||
if (HIWORD(wParam) == 0 && LOWORD(wParam) == IDM_EXIT)
|
||||
if (HIWORD(wParam) == 0 && LOWORD(wParam) == IDM_ABOUT)
|
||||
MessageBox(dlg, std::format("{} {}\nCopyright Grayson Riffe 2026\ngraysonriffe.com\n\n"
|
||||
"\t{} is a simple countdown application\n"
|
||||
"specifically designed for this electronics testing labratory.\n\n"
|
||||
"Hopefully, it's working!", app->m_appName, app->m_appVersion,
|
||||
app->m_appName).c_str(), std::format("About {}", app->m_appName).c_str(), MB_OK);
|
||||
|
||||
else if (HIWORD(wParam) == 0 && LOWORD(wParam) == IDM_EXIT)
|
||||
DestroyWindow(dlg);
|
||||
|
||||
return TRUE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user