🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11649

Re: Update commctrl.h

#11649
From: Remy Lebeau (TeamB)
Date: Tue, 27 Jan 2004 19:33
37 lines
2685 bytes
"eric67" <myfantasy@libero.it> wrote in message
news:4016b247@newsgroups.borland.com...

> Can I replace commctrl.h shipped on Builder6 cd with
> commctrl.h from Microsoft SDK (2002)?

I would not recommend it.  Borland always has to "tweak" the SDK headers to
work properly under BCB, so you would have to do the same.

> I need XP themes when my app is executed on XP and
> standard controls on older systems.

Just including a newer commctrl.h file and doing nothing else will not
automatically get you that support.  You would still need to actually call
the appropriate theming functions manually, which means performing OS
version checking, dynamic linking of libraries so that your exe won't error
on older systems, etc..  That also won't address any of the problems that
the VCL has with XP theming (it is not supported at all) since the VCL
source code is written in Pascal, not C++, and thus does not use the SDK
header files to begin with.

Besides, to enable theming support, you don't really need to change your
code to begin with.  Just include a manifest file with your app and XP will
automatically apply the newer ComCtrls library to your executable when it is
executed, and it will enable theme displays for you.  Of course, you have to
be careful with doing that if you are using the VCL, since the VCL in BCB
does not support XP drawing rules at all, thus all of the custom-drawn
components will not work correctly when themes are enabled.

In any case, there are better ways to approach this issue.  Look at Theme
Manager from http://www.delphi-gems.com/ThemeManager.php, for example.  It
already does exactly what you are asking for, as well as addresses/fixes
many of the known VCL issues with XP themes.


Gambit
Technical Details
Message-ID: <4016bb79$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4016b247@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,25665ea65a4f94b0
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-27 11:40:39 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4016b247@newsgroups.borland.com>
Subject: Re: Update commctrl.h
Date: Tue, 27 Jan 2004 11:33:41 -0800
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <4016bb79$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1075231609 67.22.138.253 (27 Jan 2004 11:26:49 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail