Sowl  1.0
Simple Object Window Library
DeviceContext.h
1 #pragma once
2 #include <windows.h>
3 
4 namespace sowl
5 {
7  {
8  public:
9  DeviceContext(HDC hdc);
10  DeviceContext(const DeviceContext& other) = delete;
11  DeviceContext& operator=(const DeviceContext& other) = delete;
12 
13  HDC GetHandle() const;
14  void FillRect(const RECT* rect, HBRUSH hbr) const;
15  void FillRect(const RECT* rect, int iSystemColorIndex) const;
16  void Ellipse(const RECT& rect) const;
17  int DrawText(LPCWSTR text, const RECT& rect, unsigned int format) const;
18  int SetBackgroundMode(int mode) const;
19 
20  protected:
21  HDC SetHandle(HDC hdc);
22 
23  private:
24  HDC hdc;
25  };
26 }
Definition: DeviceContext.h:6