Article View: borland.public.cppbuilder.nativeapi
Article #5427Re: XP Theming
From: Remy Lebeau (TeamB)
Date: Wed, 24 Aug 2005 19:22
Date: Wed, 24 Aug 2005 19:22
42 lines
2161 bytes
2161 bytes
"JD" <nospam@nospam.com> wrote in message news:430cb5d9$1@newsgroups.borland.com... > I need to run it from within a subclassed TStringGrid. When I > use the grid's Handle, OpenThemeData fails (returns NULL). According to MSDN: "Call OpenThemeData and pass the hwnd of the control you wish to apply visual styles to and a class list that describes the control's type. The classes are defined in Tmschema.h. OpenThemeData returns an HTHEME handle, but if the visual style manager is disabled or the current visual style does not supply specific information for a given control, the function returns NULL." > A call to GetLastError consistantly returns: > > Error Code : 2147943568 > > and if I pump that code into SysErrorMessage, it returns: > > "Element Not Found." Exactly. You are trying to load a theme element that does not actually exist for TStringGrid. > Since I can't find anything on this, I've assumed that it's > meaningless or not useful. You assume incorrectly. > In an effort to work around this problem, I've substituted > using the grid's Handle with using the Application's Handle and > the main form's Handle but I get the same result as when I use > the grid's Handle. Then you are not using it properly to begin with. Please show your actual code. Gambit
Technical Details
Message-ID:
<430cc947$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<430cb5d9$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> Subject: Re: XP Theming Date: Wed, 24 Aug 2005 12:22:18 -0700 Lines: 44 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: <430cc947$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1124911431 68.69.17.41 (24 Aug 2005 12:23:51 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail