home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Examples / DDraw / DDraw3 / MAIN.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  1.1 KB  |  41 lines

  1. #ifndef MainH
  2. #define MainH
  3. #include <Classes.hpp>
  4. #include <Controls.hpp>
  5. #include <StdCtrls.hpp>
  6. #include <Forms.hpp>
  7.  
  8. #define WM_INFOSTART WM_USER
  9.  
  10. //---------------------------------------------------------------------------
  11. class TForm1 : public TForm
  12. {
  13. __published:
  14.   void __fastcall FormDestroy(TObject *Sender);
  15.   void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
  16.     TShiftState Shift);
  17.   void __fastcall FormPaint(TObject *Sender);
  18. private:
  19.   LPDIRECTDRAW  lpDD;
  20.   LPDIRECTDRAWSURFACE  lpDDSPrimary;
  21.   LPDIRECTDRAWSURFACE  lpDDSBack;
  22.   LPDIRECTDRAWSURFACE  lpDDSOne;
  23.   LPDIRECTDRAWPALETTE  lpDDPal;
  24.   BOOL FActive;
  25.   BOOL FRunApp;
  26.   void UpdateFrame(void);
  27.   void Start();
  28.   void InitFail();
  29.   HRESULT RestoreAll(void);
  30.   MESSAGE void MyMove(TMessage &Message);
  31. public:
  32.   __fastcall TForm1(TComponent* Owner);
  33. BEGIN_MESSAGE_MAP
  34.   MESSAGE_HANDLER(WM_INFOSTART, TMessage, MyMove);
  35. END_MESSAGE_MAP(TForm);
  36. };
  37. //---------------------------------------------------------------------------
  38. extern TForm1 *Form1;
  39. //---------------------------------------------------------------------------
  40. #endif
  41.