Click here to Skip to main content
15,913,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPostMessage problem Pin
BlackDice7-Jul-04 11:44
BlackDice7-Jul-04 11:44 
GeneralCFrameWnd draw Pin
james6667-Jul-04 10:56
james6667-Jul-04 10:56 
GeneralNeed help for memory leak Pin
Vincent Ye7-Jul-04 10:21
Vincent Ye7-Jul-04 10:21 
GeneralRe: Need help for memory leak Pin
David Crow7-Jul-04 10:29
David Crow7-Jul-04 10:29 
GeneralRe: Need help for memory leak Pin
Vincent Ye7-Jul-04 10:40
Vincent Ye7-Jul-04 10:40 
GeneralGDI+ to get image information Pin
pnpfriend7-Jul-04 9:59
pnpfriend7-Jul-04 9:59 
Generalgetting HBitmap handle from RBG data Pin
Omar Alvi7-Jul-04 9:50
Omar Alvi7-Jul-04 9:50 
GeneralRe: getting HBitmap handle from RBG data Pin
Antti Keskinen7-Jul-04 10:36
Antti Keskinen7-Jul-04 10:36 
First, a simple question: do you have any other method of transfering the bitmap data, other than raw RGB ? Such as a bitmap file ? Creating bitmaps from raw data is a painful process, and very sensitive to errors..

But, let's get to it. The following check-up list will create somekind of a bitmap for you and blit it to the screen. It might or might not look correct.

1. Create a memory device context that is compatible with the display or the window you wish to blit to.
2. Create a bitmap that is compatible with this DC, specifying the width and height as you do. The width and height are dependant on the size of the color data you have. They MUST match.
3. Select the bitmap into the device context.
4. By using SetPixel, set the color of each pixel in the memory DC. You get the colors from the data at the buffer.
5. Blit from the memory device context into the target DC.

After this, the target DC contains a representation of the bitmap data in memory. The colors may be wrong, and if so, you need to determine the palette that was first used to create the data in the memory. This is next to an impossible task (probably), so I can't advise you further in that.

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: getting HBitmap handle from RBG data Pin
Omar Alvi7-Jul-04 20:39
Omar Alvi7-Jul-04 20:39 
GeneralRe: getting HBitmap handle from RBG data Pin
Antti Keskinen8-Jul-04 2:14
Antti Keskinen8-Jul-04 2:14 
GeneralConfiguration file in outlook Pin
BrockVnm7-Jul-04 9:46
BrockVnm7-Jul-04 9:46 
GeneralRe: Configuration file in outlook Pin
palbano7-Jul-04 10:11
palbano7-Jul-04 10:11 
GeneralRe: Configuration file in outlook Pin
BrockVnm7-Jul-04 10:29
BrockVnm7-Jul-04 10:29 
GeneralRe: Configuration file in outlook Pin
David Crow7-Jul-04 10:26
David Crow7-Jul-04 10:26 
QuestionScrollbars ?? Pin
0v3rloader7-Jul-04 8:53
0v3rloader7-Jul-04 8:53 
AnswerRe: Scrollbars ?? Pin
Edwin Brunner7-Jul-04 9:18
Edwin Brunner7-Jul-04 9:18 
AnswerRe: Scrollbars ?? Pin
Jesper Knudsen7-Jul-04 10:01
Jesper Knudsen7-Jul-04 10:01 
GeneralRe: Scrollbars ?? Pin
0v3rloader7-Jul-04 11:59
0v3rloader7-Jul-04 11:59 
GeneralRe: Scrollbars ?? Pin
Jesper Knudsen7-Jul-04 12:39
Jesper Knudsen7-Jul-04 12:39 
GeneralRe: Scrollbars ?? Pin
0v3rloader7-Jul-04 14:59
0v3rloader7-Jul-04 14:59 
GeneralOk. More Qs on CDynLinkLibrary and apparent leak. Pin
CherezZaboro7-Jul-04 8:18
CherezZaboro7-Jul-04 8:18 
GeneralCheck Boxes Pin
DanYELL7-Jul-04 8:15
DanYELL7-Jul-04 8:15 
GeneralRe: Check Boxes Pin
Ravi Bhavnani7-Jul-04 8:28
professionalRavi Bhavnani7-Jul-04 8:28 
Generalthread (?) question Pin
sandrineV7-Jul-04 7:53
sandrineV7-Jul-04 7:53 
GeneralRe: thread (?) question Pin
palbano7-Jul-04 9:30
palbano7-Jul-04 9: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.