- HRGN hrgn = ::CreateRectRgn(XLOG2DEV(cx), YLOG2DEV(cy),
- XLOG2DEV(cx + cw), YLOG2DEV(cy + ch));
+ // the region coords are always the device ones, so do the translation
+ // manually
+ //
+ // FIXME: possible +/-1 error here, to check!
+ HRGN hrgn = ::CreateRectRgn(LogicalToDeviceX(x),
+ LogicalToDeviceY(y),
+ LogicalToDeviceX(x + w),
+ LogicalToDeviceY(y + h));