TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: MARCO ALLARD
from: HERBERT BUSHONG
date: 1997-04-04 05:46:00
subject: Bitmap in OWL?

::> Can anyone tell me how to use a bitmap in a little program?
::> I have to use OWL so it makes it even more difficult, I guess...
::> The Question is:  How do I define a bitmap, and how do I use it in my
::> program...
::> (the bitmap is for example arcade.bmp from c:\windows directory)
::> I know how to do it with a homemade bitmap, but how do I do it with an 
xt
::> one (that looks much much better than mine)
Marco,
   Is this for Windows or OS/2?  I've only used bitmaps for OWL - OS/2.
In any event, in your Resource file, define the bitmap. I know there are 
differences between Win/Resource scripts and OS2/Resource scripts bit this 
should get you started. Add a line like:
BITMAP BITMAP_ID  path/filename.bmp
where BITMAP_ID is the unique identifier for the bitmap, followed by the 
bitmap filename.
The just Compile/link and add the RES file to the exe.
You can use the TBitmap class to load it (look in your help about it).
Use the constructor:
TBitmap(HINSTANCE instance, TResID resID);
passing 0 for the instance (indicating it's in the EXE), and
BITMAP_ID as the resID.
#  Herbert Bushong    harchon@centuryinter.net       [TEAM OS/2]    
-  Blackbeard's BBS   Intelec: 239:600/0            
+  Fido: 1:19/19      http://www.win.net/eunicecity/stltcc/hbush/
---
   RM 1.31 2508   Know how Bill & Hillary met?  Both dating the same guy!
---------------
* Origin: Blackbeard's BBS - Ville Platte, LA - 318-468-3385 (1:19/19)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.