diff options
| author | Patrick | 2022-01-12 20:56:10 +0100 |
|---|---|---|
| committer | Patrick | 2022-01-12 20:56:10 +0100 |
| commit | 8d3cfb2ed7f4d2a70832526e1a2a68926e8a8d4b (patch) | |
| tree | caebfbef362ee689de07c19361fdc05597a97088 /src/main.cpp | |
| parent | 4264345d06a81cb561047d0973c44a129db934aa (diff) | |
| download | autorec-8d3cfb2ed7f4d2a70832526e1a2a68926e8a8d4b.tar.gz autorec-8d3cfb2ed7f4d2a70832526e1a2a68926e8a8d4b.zip | |
Makefile, auto ico
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index d89c199..4f4a866 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,10 +39,9 @@ HideNotificationIcon() void changeIcon(HWND hwnd, HINSTANCE hInstance, WORD id)
{
HICON icon = LoadIcon(hInstance, MAKEINTRESOURCE(id));
- HideNotificationIcon();
niData.hIcon = icon;
if (! IsWindowVisible(hwnd))
- ShowNotificationIcon();
+ Shell_NotifyIconA(NIM_MODIFY, &niData);
SendMessage(hwnd, WM_SETICON, 0, (LPARAM)icon);
SendMessage(hwnd, WM_SETICON, 1, (LPARAM)icon);
}
@@ -188,7 +187,7 @@ WinMain(HINSTANCE hInstance, lay_id col1 = win::createLayId(&window.ctx, row2, 80, 0, LAY_COLUMN, LAY_VCENTER);
lstActiveProcesses.addStyle(WS_VSCROLL);
-
+
lay_set_margins_ltrb(ctx, col1, 5, 0, 5, 0);
win::ListBox lstMonitoredProcesses(&window, row2, 0, 0, 0, LAY_FILL);
@@ -253,7 +252,7 @@ WinMain(HINSTANCE hInstance, SetTimer(window.hwnd, 10123, 100, [](HWND, UINT, UINT_PTR, DWORD) {
if (!recording) {
- if (checkForegroundProcess("notepad.exe")) {
+ if (checkForegroundProcess("League of Legends.exe")) {
recording = true;
process = getHwndProcess(GetForegroundWindow());
startRecording();
@@ -270,4 +269,6 @@ WinMain(HINSTANCE hInstance, while (window.update()) {
ws::update();
}
+
+ return 0;
}
|
