Click here to Skip to main content
15,900,725 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBITMAP handling for screen Pin
Vancouver16-Feb-07 13:12
Vancouver16-Feb-07 13:12 
AnswerRe: BITMAP handling for screen [modified] Pin
Mark Salsbery16-Feb-07 13:58
Mark Salsbery16-Feb-07 13:58 
GeneralRe: BITMAP handling for screen Pin
Vancouver16-Feb-07 18:04
Vancouver16-Feb-07 18:04 
GeneralRe: BITMAP handling for screen Pin
Waldermort16-Feb-07 19:13
Waldermort16-Feb-07 19:13 
GeneralRe: BITMAP handling for screen Pin
Vancouver17-Feb-07 9:58
Vancouver17-Feb-07 9:58 
GeneralRe: BITMAP handling for screen Pin
Mark Salsbery18-Feb-07 7:12
Mark Salsbery18-Feb-07 7:12 
GeneralRe: BITMAP handling for screen Pin
Vancouver18-Feb-07 7:53
Vancouver18-Feb-07 7:53 
GeneralRe: BITMAP handling for screen Pin
Mark Salsbery18-Feb-07 8:36
Mark Salsbery18-Feb-07 8:36 
Vancouver wrote:
1. A rather polemic question, isn't it?


Wasn't meant to be. Using GetDeviceCaps(NUMCOLORS) is useful for getting a color table size and
that's about it. The BITSPIXEL and PLANES items are the most useful for creating a DDB/DIB with
a format which matches a device. The NUMCOLORS item is helpful when you need to create a palette
and/or a color table.

Vancouver wrote:
2. Of course "correct color" is something more than one bit per pixel (i.e. not what I received in CreateCompatibleBitmap).


"Of course" to you, but to us non-mind readers it's not so obvious. In my original response I
posted code that does NOT return a bitmap with a monochrome format (unless you have your video
set to a monochrome mode). You stated something doesn't match the documentation, yet I am unable
to find what you were referring to specifically. This stuff hasn't changed since the beginning
of Windows so the documentation is pretty mature, so, I respectfully disagree Smile | :) .

Vancouver wrote:
3. Yes, that's what my comparisons resulted.


Since my original response you have found a solution so I guess that makes the above points
irrelevant anyway. I just won't be able to sleep at night if you go on thinking that you can't
create a DDB the same format as the screen...after all, you may need to do that someday - for
double buffering and the like. Smile | :)

Cheers!
Mark


Great job, team. Head back to base for debriefing and cocktails.

GeneralRe: BITMAP handling for screen Pin
Vancouver18-Feb-07 7:46
Vancouver18-Feb-07 7:46 
QuestionSFTP using C++ Pin
LCI16-Feb-07 8:50
LCI16-Feb-07 8:50 
AnswerRe: SFTP using C++ Pin
led mike16-Feb-07 12:14
led mike16-Feb-07 12:14 
QuestionOn paint calling order Pin
Kharfax16-Feb-07 8:01
Kharfax16-Feb-07 8:01 
AnswerRe: On paint calling order Pin
Newbie0016-Feb-07 8:09
Newbie0016-Feb-07 8:09 
AnswerRe: On paint calling order Pin
PJ Arends16-Feb-07 8:22
professionalPJ Arends16-Feb-07 8:22 
AnswerRe: On paint calling order Pin
Kharfax16-Feb-07 8:26
Kharfax16-Feb-07 8:26 
AnswerRe: On paint calling order Pin
Michael Dunn16-Feb-07 10:17
sitebuilderMichael Dunn16-Feb-07 10:17 
QuestionHow to disable selected drives? Pin
Super Hornet16-Feb-07 4:57
Super Hornet16-Feb-07 4:57 
QuestionRe: How to disable selected drives? Pin
David Crow16-Feb-07 5:14
David Crow16-Feb-07 5:14 
QuestionRe: How to disable selected drives? Pin
Super Hornet16-Feb-07 5:49
Super Hornet16-Feb-07 5:49 
AnswerRe: How to disable selected drives? Pin
David Crow16-Feb-07 6:42
David Crow16-Feb-07 6:42 
AnswerRe: How to disable selected drives? Pin
Newbie0016-Feb-07 7:16
Newbie0016-Feb-07 7:16 
QuestionWeb server sing VC++/MFC Pin
softwaremonkey16-Feb-07 4:29
softwaremonkey16-Feb-07 4:29 
AnswerRe: Web server sing VC++/MFC Pin
led mike16-Feb-07 4:35
led mike16-Feb-07 4:35 
AnswerRe: Web server sing VC++/MFC Pin
Nemanja Trifunovic16-Feb-07 4:35
Nemanja Trifunovic16-Feb-07 4:35 
Questionhow to run an application at windows startup? Pin
Super Hornet16-Feb-07 4:09
Super Hornet16-Feb-07 4:09 

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.