コード例 #1
0
ファイル: owlext.cpp プロジェクト: Meridian59/Meridian59
void DrawDisabledButton(TDC& dc, const TRect& rc)
{
  // create a monochrome memory DC
  //
  TMemoryDC ddc;
  TBitmap bmp(ddc, rc.Width(), rc.Height());
  ddc.SelectObject(bmp);

  // build a mask
  //
  ddc.PatBlt(0, 0, rc.Width(), rc.Height(), WHITENESS);
  dc.SetBkColor(TColor::Sys3dFace);
  ddc.BitBlt(0, 0, rc.Width(), rc.Height(), dc, rc.left, rc.top, SRCCOPY);
  dc.SetBkColor(TColor::Sys3dHilight);
  ddc.BitBlt(0, 0, rc.Width(), rc.Height(), dc, rc.left, rc.top, SRCPAINT);

  // Copy the image from the toolbar into the memory DC
  // and draw it (grayed) back into the toolbar.
  //
  dc.FillRect(rc, TBrush(TColor::Sys3dFace));
  dc.SetBkColor(RGB(0, 0, 0));
  dc.SetTextColor(RGB(255, 255, 255));
  TBrush brShadow(TColor::Sys3dShadow);
  TBrush brHilight(TColor::Sys3dHilight);
  dc.SelectObject(brHilight);
  dc.BitBlt(rc.left+1, rc.top+1, rc.Width(), rc.Height(), ddc, 0, 0, 0x00E20746L);
  dc.SelectObject(brShadow);
  dc.BitBlt(rc.left, rc.top, rc.Width(), rc.Height(), ddc, 0, 0, 0x00E20746L);

  // reset DCs
  //
  dc.RestoreBrush();
  dc.RestoreBrush();
  ddc.RestoreBitmap();
}
コード例 #2
0
ファイル: celarray.cpp プロジェクト: Meridian59/Meridian59
//
/// Draws the cel at index onto the DC at position x and y.
//
bool
TCelArray::BitBlt(int index, TDC& dstDC, int x, int y, uint32 rop)
{
  TMemoryDC srcDC(*Bitmap);
  TRect cr = CelRect(index,-1);
  dstDC.BitBlt(x, y, cr.Width(), cr.Height(), srcDC, cr.left, cr.top, rop);
  return true;
}
コード例 #3
0
ファイル: celarray.cpp プロジェクト: Meridian59/Meridian59
//
/// Draws the image of the cel onto the DC.
//
bool
TCelArray::BitBlt(int index, TDC& dstDC, int x, int y, int /*dx*/, int /*dy*/,
                  const TColor& /*bgClr*/, const TColor& /*fgClr*/)
{
  TMemoryDC srcDC(*Bitmap);
  TRect cr = CelRect(index,-1);
  dstDC.BitBlt(x, y, cr.Width(), cr.Height(), srcDC, cr.left, cr.top);
  return true;
}
コード例 #4
0
ファイル: dibdc.cpp プロジェクト: Darkman-M59/Meridian59_115
//
// BitBlts from this DIB onto the destination DC.
//
bool
TDibDC::BitBltToScreen(TDC& dstDC, int dstX, int dstY, int dstW, int dstH,
                       int srcX, int srcY) const
{
  return dstDC.BitBlt(dstX, dstY, dstW, dstH, *this, srcX, srcY);
}
コード例 #5
0
ファイル: dibdc.cpp プロジェクト: Darkman-M59/Meridian59_115
//
// Dib Screen Update BitBlt's. A screen DC must be the destination.
// BitBlts from this DIB onto the destination DC.
//
bool
TDibDC::BitBltToScreen(TDC& dstDC, const TRect& dst, const TPoint& src) const
{
  return dstDC.BitBlt(dst, *this, src);
}