Click here to Skip to main content
15,914,109 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CPropertySheet Pin
Tomasz Sowinski21-Oct-02 0:24
Tomasz Sowinski21-Oct-02 0:24 
GeneralRe: CPropertySheet Pin
Max Santos23-Oct-02 13:51
Max Santos23-Oct-02 13:51 
QuestionDouble Buffering in a Dialog?? Pin
David_Jenkins20-Oct-02 12:06
David_Jenkins20-Oct-02 12:06 
AnswerRe: Double Buffering in a Dialog?? Pin
Chris Losinger20-Oct-02 12:11
professionalChris Losinger20-Oct-02 12:11 
AnswerRe: Double Buffering in a Dialog?? Pin
alex.barylski20-Oct-02 12:14
alex.barylski20-Oct-02 12:14 
AnswerRe: Double Buffering in a Dialog?? Pin
Paul M Watt20-Oct-02 18:04
mentorPaul M Watt20-Oct-02 18:04 
GeneralRe: Double Buffering in a Dialog?? Pin
David_Jenkins21-Oct-02 2:12
David_Jenkins21-Oct-02 2:12 
GeneralRe: Double Buffering in a Dialog?? Pin
Paul M Watt21-Oct-02 4:18
mentorPaul M Watt21-Oct-02 4:18 
David_Jenkins wrote:
So the backbuffer became the screens bitmap and the screens bitmap became the backbuffer for the next drawing cycle.

You cannot select a bitmap into a window DC, that is why that does not work, although it would be cool.

Anyway, when you use CreateCompatibleBitmap, you need to use the WindowDC when you are creating a CompatibleBitmap. That is because right after you create your MEMDC, its bit plane depth is set to 1, and if you use that DC, your bitmap will be set to 1 as well. So the process to create a good bitmap and memdc is this:

<br />
CPaintDC dc;<br />
<br />
CBitmap bitmap;<br />
bitmap.CreateCompatibleBitmap(dc);<br />
<br />
CDC memDC;<br />
memDC.CreateCompatibleDC(dc);<br />
memDC.SelectObject(bitmap);<br />


I may not have the syntax or all of the paramaters correct, but you will need to do something relatively close to this.

By moving all of your painting code to the OnEraseBkgnd handler, you will be able to free your paint routine to only do special add on painting that cannot or should not be placed into your cached bitmap.

Good Luck


Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!

GeneralRe: Double Buffering in a Dialog?? Pin
David_Jenkins22-Oct-02 4:42
David_Jenkins22-Oct-02 4:42 
Generalstructure access from another view.. Pin
Anonymous20-Oct-02 11:07
Anonymous20-Oct-02 11:07 
GeneralRe: structure access from another view.. Pin
Joaquín M López Muñoz20-Oct-02 11:11
Joaquín M López Muñoz20-Oct-02 11:11 
GeneralRe: structure access from another view.. Pin
Anonymous20-Oct-02 11:29
Anonymous20-Oct-02 11:29 
GeneralRe: structure access from another view.. Pin
Joaquín M López Muñoz20-Oct-02 11:33
Joaquín M López Muñoz20-Oct-02 11:33 
GeneralRe: structure access from another view.. Pin
Anonymous20-Oct-02 11:41
Anonymous20-Oct-02 11:41 
GeneralOne last question Pin
Anonymous20-Oct-02 13:47
Anonymous20-Oct-02 13:47 
GeneralThreading & CStringArray - long post warning Pin
carrie20-Oct-02 10:05
carrie20-Oct-02 10:05 
GeneralRe: Threading & CStringArray - long post warning Pin
Joaquín M López Muñoz20-Oct-02 10:43
Joaquín M López Muñoz20-Oct-02 10:43 
GeneralRe: Threading & CStringArray - long post warning Pin
carrie20-Oct-02 11:02
carrie20-Oct-02 11:02 
GeneralRe: Threading & CStringArray - long post warning Pin
carrie20-Oct-02 13:41
carrie20-Oct-02 13:41 
QuestionMultiline listview?!?!!?!? Pin
Nasty_p20-Oct-02 7:49
Nasty_p20-Oct-02 7:49 
AnswerRe: Multiline listview?!?!!?!? Pin
Joaquín M López Muñoz20-Oct-02 8:15
Joaquín M López Muñoz20-Oct-02 8:15 
GeneralRe: Multiline listview?!?!!?!? Pin
Nasty_p20-Oct-02 8:25
Nasty_p20-Oct-02 8:25 
GeneralRe: Multiline listview?!?!!?!? Pin
Joaquín M López Muñoz20-Oct-02 8:54
Joaquín M López Muñoz20-Oct-02 8:54 
GeneralRe: Multiline listview?!?!!?!? Pin
Nasty_p20-Oct-02 9:16
Nasty_p20-Oct-02 9:16 
GeneralRe: Multiline listview?!?!!?!? Pin
alex.barylski20-Oct-02 10:28
alex.barylski20-Oct-02 10:28 

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.