home *** CD-ROM | disk | FTP | other *** search
/ Graphics Programming Black Book (Special Edition) / BlackBook.bin / disk1 / source / chapterh / lh-1.c
Text File  |  1997-06-18  |  586b  |  27 lines

  1. //
  2. // Disables screen saver
  3. //
  4. LRESULT CALLBACK ToplevelWIndowProc(HWND hWnd, UINT uMsg,
  5.      WPARAM wParam, LPARAM lParam)
  6. {
  7.  
  8.     switch (uMsg)
  9.     {
  10.         case WM_SYSCOMMAND:
  11.             switch (wParam & ~0x0F)
  12.             {
  13.                 case SC_SCREENSAVE:
  14.                 case SC_MONITORPOWER:
  15.                     //
  16.                     // Don't call DefWindowProc() or
  17.                     // it will start the screen saver
  18.                     //
  19.                     return 0;
  20.             }
  21.         //  :
  22.         // other cases
  23.         //  :
  24.     }
  25. }
  26.  
  27.