TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: KURT KUZBA
from: ALBERTO MONTEIRO
date: 1997-11-28 18:56:00
subject: Save Bitmap in M$C

AM>   I would like to know if there is any function (or
AM>   whatever) that saves a bitmap to a file.
KK>   There is the Cbitmap::GetBitmapBits() which will send the
KK>   bits of the bitmap to a buffer. I would imagine that you
KK>   might then save the contents of the buffer easily enough.
KK>   Check your VC++ Online Help.
I've done that, several times. But with an outside help I found
my mistake: I was copying the *wrong* part of the screen <:-(
KK>   The bitmap data itself may be private. What you probably
KK>   want to do is save the entire bitmap structure.
KK>   That means you will likely want to declare a structure,
KK>   and then use the CBitmap member functions to read all the
KK>   parameter data and plug it into your structure, and then
KK>   read the bitmap itself into the structure, and then save
KK>   the entire structure.
KK>   As you can probably tell, I haven't actually attempted this
KK>   myself. :)
I could solve the problem, by using one of the examples.
KK>   It may actually be as simple as writing the class itself
KK>   to disk, since the code elements will not be included
KK>   in the data segment, and then reloading it using the
KK>   CBitmap::LoadBitmap() function.
No, it's not. The class can't be written to disk :-(
KK>   One of these two methods, and possibly both, should work.
I now have a working routine. Do you want to see it?
Alberto Monteiro
---
 þ SLMR 2.1a þ Si vous voulez vivre longtemps, vivez vieux. (Erik Satie)
--- FMail/386 1.02
---------------
* Origin: CentroIn! +55-21-205-0281, 41 lines, 24h, RJ/Brazil (4:802/21)

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™.