Files
looking-glass-2/idd/LGIddHelper/CWindow.h
T
Quantum fddcb7f2d4 [idd] helper: define WIN32_LEAN_AND_MEAN globally
It doesn't really help that much, but since we are defining it in
some headers, we might as well do it everywhere so it actually has
some effect in case the headers were included in a different order.
2025-09-23 02:07:18 +10:00

29 lines
598 B
C++

#pragma once
#include <windows.h>
#include <shellapi.h>
class CWindow {
static LRESULT CALLBACK wndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
protected:
virtual LRESULT onCreate();
virtual LRESULT onClose();
virtual LRESULT onDestroy();
virtual LRESULT onFinal();
static HINSTANCE hInstance;
static void populateWindowClass(WNDCLASSEX &wx);
virtual LRESULT handleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
HWND m_hwnd = NULL;
public:
virtual ~CWindow();
void destroy();
HWND hwnd() { return m_hwnd; }
operator HWND() { return m_hwnd; }
};