home *** CD-ROM | disk | FTP | other *** search
/ Point Programming 1 / PPROG1.ISO / c / fli106c / blwin.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-11  |  1.1 KB  |  56 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // BlazeClass
  8. //
  9.  
  10. #include "fli.h"
  11.  
  12. #ifdef __BCPLUSPLUS__
  13. #pragma hdrstop
  14. #endif
  15.  
  16. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  17. //
  18. // Window()
  19. //
  20. // Defines a BlazeClass window
  21. //
  22. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  23.  
  24. void BlazeClass::Window(int X,int Y,int Width,int Height)
  25. {
  26.   if ((Width<2 || Height<2) || (X+Width>ScreenWidth || Y+Height>ScreenHeight))
  27.     return;
  28.  
  29.   WinX=X;
  30.   WinY=Y;
  31.  
  32.   WinWide=Width;
  33.   WinHigh=Height;
  34.  
  35.   BlazeClass::X=0;
  36.   BlazeClass::Y=0;
  37. }
  38.  
  39. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  40. //
  41. // WindowInformation()
  42. //
  43. // Gets size and location information about a windowed region
  44. //
  45. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  46.  
  47. void BlazeClass::WindowInformation(int &X,int &Y,int &Width,int &Height)
  48. {
  49.   X=WinX;
  50.   Y=WinY;
  51.  
  52.   Width=WinWide;
  53.   Height=WinHigh;
  54. }
  55.  
  56.