Compare commits
No commits in common. "4eae4af91149ebf955be415067ff181c17e5044a" and "081eb00a4635b67c6772bfb725b152be58667a98" have entirely different histories.
4eae4af911
...
081eb00a46
Binary file not shown.
|
Before Width: | Height: | Size: 101 KiB |
@ -1,7 +1,6 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "src/resource.h"
|
||||
#include "version.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -88,52 +87,6 @@ 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
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ICONMAIN ICON "res\\watchful-eye.ico"
|
||||
|
||||
#endif // English (United States) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@ -6,10 +6,9 @@
|
||||
#include "resource.h"
|
||||
|
||||
#define WM_TRAYICON WM_USER // Tray icon window message
|
||||
#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
|
||||
#define IDM_EXIT 1001 // "Exit" menu identifier
|
||||
#define IDT_UPDATE 1 // Update timer identifier
|
||||
#define WM_UPDATE WM_USER + 1 // Update window message
|
||||
|
||||
namespace watchfuleye {
|
||||
Application::Application(const char* appName, const char* appVersion, unsigned int maximumMinutes, const char* driveToDetect)
|
||||
@ -63,6 +62,7 @@ namespace watchfuleye {
|
||||
app = reinterpret_cast<Application*>(lParam);
|
||||
|
||||
SetWindowText(dlg, app->m_appName.c_str());
|
||||
SendMessage(dlg, WM_SETICON, ICON_BIG, reinterpret_cast<LPARAM>(LoadIcon(NULL, MAKEINTRESOURCE(IDI_APPLICATION))));
|
||||
|
||||
// Spawn in the lower right corner of the virtual screen (might be problematic in some cases)
|
||||
int cornerX = GetSystemMetrics(SM_XVIRTUALSCREEN) + GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
||||
@ -74,11 +74,11 @@ namespace watchfuleye {
|
||||
// Set up UI
|
||||
LOGFONT lFont = {};
|
||||
strcpy(lFont.lfFaceName, "Consolas");
|
||||
lFont.lfHeight = 35;
|
||||
lFont.lfHeight = 45;
|
||||
HFONT upperFont = CreateFontIndirect(&lFont);
|
||||
SendMessage(GetDlgItem(dlg, IDC_STATICLOWER), WM_SETFONT, reinterpret_cast<WPARAM>(upperFont), NULL);
|
||||
|
||||
lFont.lfHeight = 180;
|
||||
lFont.lfHeight = 200;
|
||||
lFont.lfWeight = FW_BOLD;
|
||||
timeFont = CreateFontIndirect(&lFont);
|
||||
|
||||
@ -97,7 +97,6 @@ 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.
|
||||
@ -109,14 +108,7 @@ namespace watchfuleye {
|
||||
}
|
||||
|
||||
case WM_COMMAND: {
|
||||
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)
|
||||
if (HIWORD(wParam) == 0 && LOWORD(wParam) == IDM_EXIT)
|
||||
DestroyWindow(dlg);
|
||||
|
||||
return TRUE;
|
||||
@ -226,7 +218,7 @@ namespace watchfuleye {
|
||||
iconData.hWnd = m_mainDlg;
|
||||
iconData.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
|
||||
iconData.uCallbackMessage = WM_TRAYICON;
|
||||
iconData.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICONMAIN));
|
||||
iconData.hIcon = LoadIcon(NULL, MAKEINTRESOURCE(IDI_APPLICATION));
|
||||
strcpy(iconData.szTip, m_appName.c_str());
|
||||
Shell_NotifyIcon(NIM_ADD, &iconData);
|
||||
}
|
||||
|
||||
@ -11,10 +11,8 @@ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
|
||||
#define APPNAME "Watchful Eye"
|
||||
|
||||
// ======== Configuration ========
|
||||
#define MAX_MINUTES 15
|
||||
#define DRIVE_TO_DETECT "D:"
|
||||
// ===============================
|
||||
#define MAX_MINUTES 1
|
||||
#define DRIVE_TO_DETECT "E:"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
{
|
||||
|
||||
@ -3,14 +3,13 @@
|
||||
// Used by C:\Users\Grayson\Documents\Visual Studio 18\Solutions\watchful-eye\WatchfulEye\resource.rc
|
||||
//
|
||||
#define IDD_DIALOGMAIN 101
|
||||
#define IDI_ICONMAIN 103
|
||||
#define IDC_STATICLOWER 1000
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 104
|
||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user