Re: Owner Draw STATIC Window with XP Themes

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jonathan Wood (jwood_at_softcircuits.com)
Date: 11/11/04


Date: Thu, 11 Nov 2004 11:26:38 -0700

Jeff,

> > But wouldn't this
> > happen anyway, even if you opened the theme data when the window was
> > created?
>
> I don't think I understand where you've gone with this, Jonathan, but it
> wouldn't happen if the subclass never called OpenThemeData.

Sure, but then how would you draw with that theme data? In other words, if
the original button code in Windows is calling OpenThemeData, how can your
subclass code ever draw using themes without opening up a second HTHEME?

It would seem to me that a second HTHEME is required in this case, and then
I don't see how it matters if you opened it during WM_CREATE or during the
first pass only through your paint code.

-- 
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm

Quantcast