Re: Why CreateCompatibleDC and CreateCompatibleBitmap?

"Igor Tandetnik" <[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>
"hawkgao" <hawkgao-/[email protected]> wrote in
message news:[email protected]
> 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?

Compatible with the other HDC you are passing in as a parameter. As in, 
having the same resolution, color depth and so on.

> why windows cannot draw directly on
> device?

Can too. You don't have to call these functions, you can draw directly 
onto the device DC.
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925 





------------------------------------

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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.