home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1996 May / CD2_DEMO.ISO / code / os2 / listing2.txt < prev    next >
Encoding:
Text File  |  1996-02-28  |  808 b   |  25 lines

  1. HDC hdc;    /* device context handle */
  2. HPS hps;    /* presentation space handle */
  3. SIZEL sizel   /* needed to create the PS */
  4.       = { 0, 0 };
  5. DEVOPENSTRUC dop /* parameters for opening the DC */
  6.              = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
  7.  
  8.  
  9. /* create a memory device context */
  10. hdc = DevOpenDC (hab, OD_MEMORY, "*",
  11.                  5L, (PDEVOPENDATA)&dop, NULLHANDLE);
  12.  
  13. /* create a presentation space and and         */
  14. /* associate it with the memory device context */
  15. hps = GpiCreatePS (hab, hdc, &sizel,
  16.                    U_PELS | GPIT_MICRO | GPIA_ASSOC);
  17.  
  18. /* now load up the bitmap */
  19. hbm = GpiLoadBitmap (hps, NULLHANDLE, BMP_SPLASH, 0, 0);
  20.  
  21. /* be good and tidy up after ourselves */
  22. GpiAssociate (hps, NULLHANDLE);
  23. GpiDestroyPS (hps);
  24. DevCloseDC (hdc);
  25.