home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 1.ddi / GDIDEMO.ZIP / BITBLT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.3 KB  |  39 lines

  1. // ObjectWindows - (C) Copyright 1992 by Borland International
  2.  
  3. // BitBlt demo window header
  4.  
  5. #include "demobase.h"
  6.  
  7. /* BitBlt demo constants */
  8. const int BackgroundID      = 100; /* Bitmap ID of background bitmap */
  9. const int ShipID             = 101; /* Bitmap ID of Ship Bitmap */
  10. const int MonoShipID         = 102; /* Bitmap ID of Monochrome mask of ship */
  11. const int BitmapSize         = 72;  /* Size of Ship bitmap */
  12.  
  13.  
  14. _CLASSDEF(TBitBltWindow)
  15.  
  16. class TBitBltWindow : public TBaseDemoWindow
  17. {
  18. public:
  19.          TBitBltWindow( PTWindowsObject AParent, LPSTR ATitle);
  20.          virtual ~TBitBltWindow();
  21.          virtual LPSTR GetClassName() { return "BitBltWindow"; };
  22.          virtual void GetWindowClass( WNDCLASS& WndClass );
  23.          virtual void WMSize( TMessage& Message ) = [WM_FIRST + WM_SIZE];
  24.          virtual void WMPaint( TMessage& Message ) = [WM_FIRST + WM_PAINT];
  25.          virtual void Paint( HDC PaintDC, PAINTSTRUCT& PaintInfo );
  26.          virtual void SetupWindow();
  27.          virtual void TimerTick();
  28. private:
  29.          POINT WindowSize;
  30.          HBITMAP ScratchBitmap,
  31.                  StretchedBkgnd,
  32.                  Background,
  33.                  MonoShip,
  34.                  Ship;
  35.          int OldX, OldY, Delta, X, Y;
  36.          int CurClick;
  37.          void CalculateNewXY();
  38. };
  39.