IonicWind Software

Aurora Compiler => GUI => Topic started by: Haim on March 11, 2006, 12:28:40 AM

Title: GetRastermode
Post by: Haim on March 11, 2006, 12:28:40 AM
Cwindow has the method SetRastermode, but doesÂÃ,  not have a "GetRastermode" function for restoring the old rastermode.
(by the way, the windows API call SetROP2, which sets the rastermode, does return the previous value)

For those that are interested, I use the following function (I think it can be easily adapted to a cwindow descendant method):

sub getRasterOp(cwindow win),unsigned int
{
unsigned int  res,hdc;
res=0;
if win !=null {
hdc=win.GetHDC();
res=getrop2(hdc);
win.ReleaseHdc(hdc);
}
return res;
}

To use it you need to declare first:
declare import, GetROP2(unsigned int hdc),unsigned int;


Title: Re: GetRastermode
Post by: Ionic Wind Support Team on March 11, 2006, 08:06:43 AM
m_iROP2 is a member of the CWindow class.