Re: Why CreateCompatibleDC and CreateCompatibleBitmap?
"hawkgao" <hawkgao-/[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
I've read 'windows programming'. i didn't find any chapter cover the details of CreateCompatible*. Could you provide the link to the articles you mentioned on MSDN. --- In [email protected], "Roel Vanhout" <rvanhout@...> wrote: > > > You only need the CreateCompatible* calls when you're doing double > buffering, i.e. drawing onto an offscreen (in memory) bitmap first, then > blitting it to the window's DC, to avoid flicker. If you're using a > CPaintDC in your WTL WM_PAINT handler, you *can* draw directly on that. > > 'Compatible' refers to 'having the same properties' (color depth, > palette, ...) as the original DC. What the CreateCompatible* calls do > exactly is a long and complicated topic. I suggest reading the Petzold > for an accessible (in asfar as an intricate topic like this can be made > accessible) explanation. MSDN has the information too but IMO it's too > dense to be fully understood by a novice. > > > cheers, > > roel > > > > _____ > > From: [email protected] [mailto:[email protected]] On Behalf Of > hawkgao > Sent: Thursday, April 16, 2009 11:29 > To: [email protected] > Subject: [wtl] Why CreateCompatibleDC and CreateCompatibleBitmap? > > > > > > I've study windows programming 8 years ago. but, i even don't understand > why windows need CreateCompatibleDC and CreateCompatibleBitmap, when > drawing some thing on view. what is the "compatible" real meaning here? > why windows cannot draw directly on device? > > Thanks, > -Hawk > > > > > > > [Non-text portions of this message have been removed] > ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wtl/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/wtl/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/