home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_02_05 / 2n05014b < prev    next >
Text File  |  1991-04-02  |  619b  |  32 lines

  1. /*
  2.  * LoadNonExistentResource()
  3.  *   Loads a non-existent resource in, and attempts to delete it.
  4.  *
  5.  * Assumptions:
  6.  *   hInst is the instance of our program
  7.  *   The cursor 'BOGUS' does not exist.
  8.  *
  9.  */
  10.  
  11. LoadNonExistentResource(HANDLE hInst)
  12. {
  13.     HCURSOR hCurse;
  14.  
  15.     /*----------------------*/
  16.  
  17.     hCurse = LoadCursor(hInst,"BOGUS");
  18.  
  19.     if (hCurse != NULL)
  20.         DeleteObject((HANDLE)hCurse);
  21.     else
  22.     {
  23.         MessageBox(MainhWnd,
  24.                    "Attempting to delete an invalid cursor",
  25.                    "Debug",
  26.                    MB_ICONSTOP | MB_OK);
  27.     }
  28. }
  29.  
  30.  
  31.  
  32.