Re: Using SetWindowTheme with CCustomDraw

Anthony Williams <anthony_w.geo-/[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>
"dmagn25" <dmagn25-/[email protected]> writes:

> Is there anyway to use the theme with custom draw? (i'm only drawing
> the text and icons, I want the background/selection colors to be the
> same as in explorer's theme) - or am I doing something totally wrong?

Use CTheme (from atltheme.h) to manage the theme data.
Use theme.OpenThemeData(hWnd,L"Explorer") to load the theme data and
theme.CloseThemeData() to free it when you're done.

Then you can use the member functions like theme.DrawThemeBackground()
and theme.DrawThemeText() to draw your control.

Anthony
-- 
Author of C++ Concurrency in Action     http://www.stdthread.co.uk/book/
just::thread C++0x thread library             http://www.stdthread.co.uk
Just Software Solutions Ltd       http://www.justsoftwaresolutions.co.uk
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976



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

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:
    [email protected] 
    [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.