May 08, 2024, 02:41:02 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


GetRastermode

Started by Haim, March 11, 2006, 12:28:40 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Haim

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;



Ionic Wind Support Team

m_iROP2 is a member of the CWindow class.

Ionic Wind Support Team