Article View: comp.os.os2.programmer
Article #100Loading Bitmaps using GpiLoadBitMap?
From: ghenniga
Date: Sun, 01 Nov 1992 22:08
Date: Sun, 01 Nov 1992 22:08
37 lines
1531 bytes
1531 bytes
Is there some trick to loading bitmaps using the GPI function GpiLoadBitMap? I can't seem to load any of the bitmaps that are in my executable. Here's the calling sequence I am trying to use: #define INCL_GPIBITMAPS #define INCL_GPICONTROLS #define INCL_GPIPRIMATIVES #include <os2.h> #define IDBM_TEST 250 HPS hps; RECTL rc; HBITMAP hbm; . . . case WM_PAINT: hps = WinBeginPaint(hwnd, NULLHANDLE, &rc); WinQueryWindowRect(hwnd, &rc); hbm = GpiLoadBitMap(hps, NULLHANDLE, IDBM_TEST, 0L, 0L); GpiDeleteBitMap(hbm); WinEndPaint(hps); break; This is with C Set/2. Using the debugger, GpiLoadBitMap always returns 0, i.e., hbm = 0. I thought maybe I was missing a call or something in the resource compile, but I see the bitmap with the ID 250 get compiled into the executable by RC.EXE but I can't seem to load it!? Are there any preliminary GPI calls I need to make before I use GpiLoadBitMap? Any ideas would be appreciated GREATLY! Gary Hennigan --------- PhD Student, Computational Electromagnetics New Mexico State University email: ghenniga@NMSU.Edu
Technical Details
Message-ID:
<GHENNIGA.92Nov1150830@ampere.ampere>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!umn.edu!lynx!nmsu.edu!opus!ghennigaShow Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!umn.edu!lynx!nmsu.edu!opus!ghenniga From: ghenniga@NMSU.Edu Subject: Loading Bitmaps using GpiLoadBitMap? Message-ID: <GHENNIGA.92Nov1150830@ampere.ampere> Sender: usenet@nmsu.edu Reply-To: ghenniga@NMSU.Edu Organization: New Mexico State University - Electromagnetics Group Date: Sun, 1 Nov 1992 22:08:30 GMT Lines: 37