[idd] helper: split CWindow into base class and CNotifyWindow

This commit is contained in:
Quantum
2025-09-14 15:19:14 -04:00
committed by Geoffrey McRae
parent 118e300f2f
commit c4f3936d98
7 changed files with 152 additions and 88 deletions

View File

@@ -4,26 +4,21 @@
#include <windows.h>
#include <shellapi.h>
#define WM_NOTIFY_ICON (WM_USER)
class CWindow {
static ATOM s_atom;
static UINT s_taskbarCreated;
static LRESULT CALLBACK wndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
HWND m_hwnd = NULL;
NOTIFYICONDATA m_iconData;
HMENU m_menu;
virtual LRESULT onCreate();
LRESULT handleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
LRESULT onCreate();
LRESULT onNotifyIcon(UINT uEvent, WORD wIconId, int x, int y);
void registerIcon();
protected:
static HINSTANCE hInstance;
static void populateWindowClass(WNDCLASSEX &wx);
virtual LRESULT handleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
HWND m_hwnd = NULL;
public:
static bool registerClass();
CWindow();
~CWindow();
virtual ~CWindow();
void destroy();
HWND hwnd() { return m_hwnd; }