Article View: borland.public.cppbuilder.nativeapi
Article #5187Re: XP Theming
From: Remy Lebeau (TeamB)
Date: Thu, 25 Aug 2005 06:27
Date: Thu, 25 Aug 2005 06:27
30 lines
2101 bytes
2101 bytes
"JD" <nospam@nospam.com> wrote in message news:430d25b0$1@newsgroups.borland.com... > 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. Well, your code is in the constructor, where the inherited Handle is not valid to begin with. What happens if you delay your code until after the StringGrid's Handle is actually available? > Not true. Yes true. > UxTheme.dll can be present and theming enabled but you still need > to check the Major version for ComCtl32 No, you do not. > because to do theming, a manifest file must still exist. Exactly. Since you are dynamically loading the theming functions at runtime, if no manifest exists then the OS will load ComCtrl32.dll v5.x instead of v6.x, and thus GetProcAddress() will fail to find the functions. You can test for that condition without doing any version checking at all. Gambit
Technical Details
Message-ID:
<430d656e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newspeer.tds.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!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> <430d25b0$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: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi 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> <430d25b0$1@newsgroups.borland.com> Subject: Re: XP Theming Date: Wed, 24 Aug 2005 23:27:13 -0700 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <430d656e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1124951406 68.69.17.41 (24 Aug 2005 23:30:06 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newspeer.tds.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail