home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 9.ddi / TVSRC.ZIP / MISC.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.5 KB  |  45 lines

  1. /*------------------------------------------------------------*/
  2. /* filename -       misc.cpp                                  */
  3. /*                                                            */
  4. /* function(s)                                                */
  5. /*          message -- sends a message to an object           */
  6. /*------------------------------------------------------------*/
  7.  
  8. /*------------------------------------------------------------*/
  9. /*                                                            */
  10. /*    Turbo Vision -  Version 1.0                             */
  11. /*                                                            */
  12. /*                                                            */
  13. /*    Copyright (c) 1991 by Borland International             */
  14. /*    All Rights Reserved.                                    */
  15. /*                                                            */
  16. /*------------------------------------------------------------*/
  17.  
  18. #define Uses_TView
  19. #define Uses_TEvent
  20. #define Uses_TObject
  21. #define Uses_TVMemMgr
  22. #include <tv.h>
  23.  
  24. void *message( TView *receiver, ushort what, ushort command, void *infoPtr)
  25. {
  26.     if( receiver == 0 )
  27.         return 0;
  28.  
  29.     TEvent event;
  30.     event.what = what;
  31.     event.message.command = command;
  32.     event.message.infoPtr = infoPtr;
  33.     receiver->handleEvent( event );
  34.     if( event.what == evNothing )
  35.         return event.message.infoPtr;
  36.     else
  37.         return 0;
  38. }
  39.  
  40. Boolean lowMemory()
  41. {
  42.     return Boolean(TVMemMgr::safetyPoolExhausted());
  43. }
  44.  
  45.