Click here to Skip to main content
15,919,336 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ActiveX C++ Pin
Wender Oliveira18-Jun-04 2:07
Wender Oliveira18-Jun-04 2:07 
GeneralPainting On Desktop Pin
Member 99352617-Jun-04 9:54
Member 99352617-Jun-04 9:54 
GeneralRe: Painting On Desktop Pin
*Dreamz17-Jun-04 18:38
*Dreamz17-Jun-04 18:38 
GeneralConverting XML strings from webservice Pin
ldaoust17-Jun-04 9:44
ldaoust17-Jun-04 9:44 
Generaldisplaying bmp image Pin
pavanbabut17-Jun-04 9:28
pavanbabut17-Jun-04 9:28 
GeneralRe: displaying bmp image Pin
microcyb17-Jun-04 10:04
microcyb17-Jun-04 10:04 
GeneralRe: displaying bmp image Pin
pavanbabut17-Jun-04 10:11
pavanbabut17-Jun-04 10:11 
GeneralRe: displaying bmp image Pin
vleungc17-Jun-04 12:24
vleungc17-Jun-04 12:24 
Hi,

On a similar note, I am also have trouble accessing a .bmp image. This is what I have got so far,

Let file.bmp be the target .bmp file. It can be accessed as follows,
---------------------------------------------------------
BITMAP bm;

HBITMAP hbitmap = (HBITMAP)::LoadImage(NULL,"file.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);

GetObject(hbitmap,sizeof(BITMAP), &bm);

--------------------------------------------------------
The above 3 lines gets you from file.bmp to a BITMAP data structure you can access and manipulate. The BITMAP data structure can be seen at MSDN via http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_2h6a.asp

BITMAP is just a struct, not a class, and so is accessed directly.

The above lines require #include <windows.h>

I was able to get to the BITMAP data structure, but have yet to decode what everything in the data structure means. This is not much, but it's a start.

Any additional help on the data structure would be greatly appreciated. Thanks in advance.


Victor
GeneralRegOpenKeyEx on MS Visual C++ Pin
carpetbagger17-Jun-04 9:19
carpetbagger17-Jun-04 9:19 
GeneralRe: RegOpenKeyEx on MS Visual C++ Pin
gamitech17-Jun-04 12:02
gamitech17-Jun-04 12:02 
GeneralRe: RegOpenKeyEx on MS Visual C++ Pin
ask_you17-Jun-04 20:47
ask_you17-Jun-04 20:47 
GeneralEnumeration Attributes Pin
Kevin Kucera17-Jun-04 9:18
sussKevin Kucera17-Jun-04 9:18 
GeneralRe: Enumeration Attributes Pin
Michael Dunn17-Jun-04 20:21
sitebuilderMichael Dunn17-Jun-04 20:21 
GeneralDisplaying a CTreeView Pin
kfaday17-Jun-04 9:10
kfaday17-Jun-04 9:10 
GeneralLoad a bitmap in a CStatic form a file Pin
kfaday17-Jun-04 9:07
kfaday17-Jun-04 9:07 
GeneralRe: Load a bitmap in a CStatic form a file Pin
ldaoust17-Jun-04 9:47
ldaoust17-Jun-04 9:47 
GeneralRe: Load a bitmap in a CStatic form a file Pin
kfaday19-Jun-04 4:39
kfaday19-Jun-04 4:39 
GeneralSockets in 64-bit Pin
s7roz17-Jun-04 8:56
s7roz17-Jun-04 8:56 
GeneralRe: Sockets in 64-bit Pin
valikac17-Jun-04 12:57
valikac17-Jun-04 12:57 
GeneralCString vs. std::string performance for large buffers Pin
Maximilien17-Jun-04 7:45
Maximilien17-Jun-04 7:45 
GeneralRe: CString vs. std::string performance for large buffers Pin
palbano17-Jun-04 8:22
palbano17-Jun-04 8:22 
Generalfollowup and another question. Pin
Maximilien17-Jun-04 10:34
Maximilien17-Jun-04 10:34 
GeneralRe: followup and another question. Pin
vladfein17-Jun-04 11:32
vladfein17-Jun-04 11:32 
GeneralDDEML - DdePostAdvise Pin
swerajan17-Jun-04 7:20
swerajan17-Jun-04 7:20 
GeneralBasic Graphics Question Pin
Piccaso17-Jun-04 6:30
Piccaso17-Jun-04 6:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.