Public Member Functions |
| DC () |
| DC (HWND fw) |
| Gets the DC of the given window.
|
| DC (HWND fw, HDC ndc) |
| Wraps the given DC and internally associates it with the given window.
|
| DC (HDC ndc) |
| Wraps the given DC.
|
| DC (const DC &ndc) |
| Creates a compatible DC and wraps it.
|
virtual | ~DC () |
virtual void | SetWindow (HWND fw) |
| Set the window for which the DC should be internally associated.
|
virtual HWND | GetWindow () const |
| Get the window for which the DC is internally associated.
|
virtual bool | Get () |
| Get the DC for the window the object is associated with.
|
virtual void | Free () |
| Free the DC. The method depends on whether the DC is internally associated with a window.
|
virtual void | _Release () |
| Free a DC that is associated with a window.
|
virtual void | _Delete () |
| Free a DC that is not associated with any window.
|
virtual HDC | GetHDC () const |
| Get the windows DC handle.
|
virtual void | SetHDC (HDC ndc) |
| Set the windows DC handle.
|
virtual void | SetPos (int x, int y) const |
| Graphics operation. Sets the current coordinate from the top-left corner.
|
virtual POINT | GetPos () const |
| Graphics operation. Returns the current coordinate from the top-left corner.
|
virtual void | DrawLine (int width, int height) |
| Treats its parameters as offsets from the current position.
|
virtual void | DrawRect (int x, int y, int width, int height) |
| Draws a rectangle.
|
virtual void | DrawRect (const RECT *r) |
| Draws a rectangle.
|
virtual HDC | CreateCompatibleHDC () const |
| Creates a compatible DC and returns the windows handle.
|
virtual void | Copy (const DC &dvc) |
| Performs a BitBlt operation and copies given DC entirely.
|
virtual HBITMAP | CreateCompatibleBitmap () const |
| Creates a compatible bitmap and returns the windows handle.
|
virtual void | Select (HGDIOBJ obj) |
| Selects the given object. The previously selected object is pushed onto a deque.
|
virtual void | Unselect (HGDIOBJ obj) |
| Pops the previously selected object of the same type off a deque and selects it.
|
virtual void | UnselectAll () |
| Restores the original object for all object types for which objects have been selected.
|
virtual void | SolidFill (HBRUSH brush) |
| Fills the device context completely with the given brush.
|
virtual void | FillRect (int x, int y, int width, int height, HBRUSH hbr) |
| Fills a rectangle with the given brush.
|
virtual void | FillRect (const RECT *r, HBRUSH hbr) |
| Fills a rectangle with the given brush.
|
virtual void | DrawAbsLine (int x, int y) |
| Draws a line to the given coordinate.
|
virtual void | Draw (HICON hIcon, int destX=0, int destY=0) |
| Draws an icon at the given coordinate.
|
virtual DC & | operator= (HWND fw) |
| Internally associates the object with the given window.
|
virtual DC & | operator= (HDC ndc) |
| Wraps the given DC.
|
virtual DC & | operator= (const DC &ndc) |
| Creates a compatible DC and wraps it.
|
virtual | operator HDC () const |
| Returns the windows handle of the DC which the object is wrapping.
|
Wrap an Device Context to make generic graphic operations easier.
Definition at line 28 of file dc.h.