Add WindowHDC RAII helper class

After the renaming in the parent commit, this name is now free to be
used for the class creating a window HDC.
This commit is contained in:
Vadim Zeitlin 2022-12-11 00:29:50 +00:00
parent 446f4c6afb
commit 002b97101e

View file

@ -456,6 +456,13 @@ public:
explicit ClientHDC(HWND hwnd) : AutoHDC(hwnd, ::GetDC(hwnd)) { }
};
// same as ClientHDC but includes the non-client part of the window
class WindowHDC : public AutoHDC
{
public:
explicit WindowHDC(HWND hwnd) : AutoHDC(hwnd, ::GetWindowDC(hwnd)) { }
};
// the same as ScreenHDC but for memory DCs: creates the HDC compatible with
// the given one (screen by default) in ctor and destroys it in dtor
class MemoryHDC