Click here to Skip to main content
15,890,825 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Clicking a button remotely Pin
Hamid_RT28-Aug-06 7:09
Hamid_RT28-Aug-06 7:09 
QuestionA good book to learn about displaying images with MFC? Pin
csmithmaui25-Aug-06 16:21
csmithmaui25-Aug-06 16:21 
AnswerRe: A good book to learn about displaying images with MFC? Pin
Dave Calkins25-Aug-06 16:52
Dave Calkins25-Aug-06 16:52 
GeneralRe: A good book to learn about displaying images with MFC? Pin
csmithmaui25-Aug-06 17:23
csmithmaui25-Aug-06 17:23 
AnswerRe: A good book to learn about displaying images with MFC? Pin
Christian Graus25-Aug-06 16:58
protectorChristian Graus25-Aug-06 16:58 
GeneralRe: A good book to learn about displaying images with MFC? Pin
csmithmaui25-Aug-06 17:16
csmithmaui25-Aug-06 17:16 
Questiondrawing in a dib file Pin
hugoiko25-Aug-06 16:05
hugoiko25-Aug-06 16:05 
AnswerRe: drawing in a dib file Pin
Dave Calkins25-Aug-06 16:17
Dave Calkins25-Aug-06 16:17 
Some things I noticed with the code:

1) hdr.bfSize should be the size of the entire file not just the headers and color table
2) I don't think you need a color table if you're doing a 24-bit image; you should be able to remove it from your offset calculation
3) your code is only writing out the file header and the info header and nothing else, so you're not going to see anything; you need to write out the actual image data after the info structure

See the MSDN docs for device independent bitmaps for more info.

Also, if you want to use the GDI functions to do rendering, then you'll need to have a DIB section and select it into a DC. If you're just writing the pixels directly to the memory, then this isn't necessary.
GeneralRe: drawing in a dib file Pin
hugoiko26-Aug-06 14:02
hugoiko26-Aug-06 14:02 
GeneralRe: drawing in a dib file Pin
Dave Calkins26-Aug-06 17:44
Dave Calkins26-Aug-06 17:44 
GeneralRe: drawing in a dib file Pin
hugoiko27-Aug-06 11:53
hugoiko27-Aug-06 11:53 
GeneralRe: drawing in a dib file Pin
Dave Calkins27-Aug-06 12:38
Dave Calkins27-Aug-06 12:38 
GeneralRe: drawing in a dib file Pin
hugoiko27-Aug-06 13:58
hugoiko27-Aug-06 13:58 
AnswerRe: drawing in a dib file Pin
Hamid_RT28-Aug-06 7:11
Hamid_RT28-Aug-06 7:11 
QuestionEnter Key killing my dialog [modified] Pin
Ger Hayden25-Aug-06 13:17
Ger Hayden25-Aug-06 13:17 
AnswerRe: Enter Key killing my dialog Pin
RChin25-Aug-06 14:16
RChin25-Aug-06 14:16 
AnswerRe: Enter Key killing my dialog Pin
Justin Tay25-Aug-06 14:21
Justin Tay25-Aug-06 14:21 
Questionthe : operator Pin
Waldermort25-Aug-06 13:10
Waldermort25-Aug-06 13:10 
AnswerRe: the : operator Pin
BadKarma25-Aug-06 13:29
BadKarma25-Aug-06 13:29 
GeneralRe: the : operator Pin
Waldermort25-Aug-06 13:44
Waldermort25-Aug-06 13:44 
GeneralRe: the : operator Pin
Justin Tay25-Aug-06 13:54
Justin Tay25-Aug-06 13:54 
GeneralRe: the : operator Pin
BadKarma25-Aug-06 14:02
BadKarma25-Aug-06 14:02 
GeneralRe: the : operator [modified] Pin
Waldermort25-Aug-06 14:16
Waldermort25-Aug-06 14:16 
QuestionSkinning Pin
BlitzPackage25-Aug-06 12:07
BlitzPackage25-Aug-06 12:07 
AnswerRe: Skinning Pin
Mircea Puiu26-Aug-06 20:22
Mircea Puiu26-Aug-06 20:22 

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.