HdcModeSetter Class Reference

Helper class for setting and resetting the ROP2 mode. More...

List of all members.

Public Member Functions

 HdcModeSetter (Canvas &canvas, int mode)
 Constructor setting the ROP2 of the given Device Context.
 ~HdcModeSetter ()
 Automatically resets the ROP2.


Detailed Description

Helper class for setting and resetting the ROP2 mode.

The ROP2 mode is used for telling windows which type of brush you want while painting.
this class ensures we reset the ROP2 mode after we have fiinished with it.
Used in combination with e.g. UpdateCanvas or PaintCanvas.
Supported modes are those supported in Windows API

Related classes


Constructor & Destructor Documentation

HdcModeSetter ( Canvas canvas,
int  mode 
)

Constructor setting the ROP2 of the given Device Context.

The mode is any of the above enums.

~HdcModeSetter (  ) 

Automatically resets the ROP2.

Resets the mode back to what it was before this object was created. Note this object cannot have longer lifetime than the Canvas given to the Constructor since this will cause undefined behavior.

Back to SmartWin website
SourceForge.net Logo