Article View: borland.public.cppbuilder.nativeapi
Article #5184Re: XP Theming
From: JD
Date: Thu, 25 Aug 2005 01:58
Date: Thu, 25 Aug 2005 01:58
37 lines
2532 bytes
2532 bytes
"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote: > >> I thought you wanted to see what code didn't work. > >No, that is not the code I wanted to see. I wanted to see your original >StringGrid code that started this discussion in the first place. It's *exactly* what I posted except that the object was derived from TStringGrid and instead of using AllocateHWnd, I passed the grid's Handle to OpenThemeData. I haven't had a chance to test it yet but I'm of the opinion that the HWND is a moot point as far as the theme drawing is concerned because the drawing functions that I'm looking at want an HDC and a RECT. I'm thinking that as long as I get it opened, I can draw in the fashion as determined by the LPCWSTR parameter. >> HINSTANCE hComCtl32 = ::LoadLibrary( "ComCtl32.dll" ); > >Use GetModuleHandle() instead: I did initially but because I had problems, I reverted to what *I* knew to be true. The win32 help was a bit fuzzy to me. > Better yet, why bother checking ComCtl32.dll at all? You > are only using it to decide whether to check for UxTheme.dll > which you can do without first checking ComCtl32.dll at all. Not true. UxTheme.dll can be present and theming enabled but you still need to check the Major version for ComCtl32 because to do theming, a manifest file must still exist. If it does not exist, ComCtl32 returns 5 as the major version number instead of 6. ~ JD
Technical Details
Message-ID:
<430d25b0$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.esat.net!colt.net!news-lond.gip.net!news-raspail.gip.net!news.gsl.net!gip.net!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<430cb5d9$1@newsgroups.borland.com> <430cc947$1@newsgroups.borland.com> <430cd1e4$1@newsgroups.borland.com> <430cda41$1@newsgroups.borland.com> <430ce1b2$1@newsgroups.borland.com> <430ce62c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,155e299ff335af68 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Re: XP Theming Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 205.188.116.198 X-Forwarded-For: 172.158.40.159 References: <430cb5d9$1@newsgroups.borland.com> <430cc947$1@newsgroups.borland.com> <430cd1e4$1@newsgroups.borland.com> <430cda41$1@newsgroups.borland.com> <430ce1b2$1@newsgroups.borland.com> <430ce62c$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <430d25b0$1@newsgroups.borland.com> Date: 24 Aug 2005 18:58:08 -0700 X-Trace: newsgroups.borland.com 1124935088 207.105.83.66 (24 Aug 2005 18:58:08 -0700) Lines: 38 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.esat.net!colt.net!news-lond.gip.net!news-raspail.gip.net!news.gsl.net!gip.net!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail