🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: XP Style

#17580
From: Michel Leunen
Date: Sat, 22 Mar 2003 20:28
62 lines
3309 bytes
Ellis wrote:

> I was wondering how can my application use the new control of Windows XP
> like the push button or the progress bar ?  I'm running Windows XP Pro and
> compiling with BCB6 Enterprise.

First, BCB has no support for XP! This means that the following may work 
or not, depending of what control you're using in your application. If 
you want your controls to look like the XP controls, you have to tell 
Windows to use the new comctrls 6.0 by including a manifest as part of 
your resource application or to distribute a manifest file with your 
application. The manifest must be of the following form (change the 
"The_name_of_your_application" with whatever you want):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
	<assemblyIdentity
		version="1.0.0.0"
		processorArchitecture="X86"
		name="The_name_of_your_application"
		type="win32"/>
	
	<dependency>
		<dependentAssembly>
			<assemblyIdentity
				type="win32"
				name="Microsoft.Windows.Common-Controls"
				version="6.0.0.0"
				processorArchitecture="X86"
				publicKeyToken="6595b64144ccf1df"
				language="*"/>
		</dependentAssembly>
	</dependency>
</assembly>

First way to use that manifest:
Put this in a file called your_app.exe.manifest and distribute it with 
your app. That's all. Windows checks if a manifest file exists when you 
launch an application.

The second way is to include this manifest directly in the resource of 
your app:

Put the manifest above in a file, say your_app.manifest.
Create a .rc file containing this line:
	1 24 "your_app.manifest"
Compile and link your resource with your application.

Be aware that, as BCB has no support yet for XP, using a manifest file 
works for some controls but not for others. No problem with buttons, 
check boxes, radio buttons...but Listviews or treeviews are unusable. 
The only way to know if it works fine is to test your app with the manifest.


HTH
Michel
-- 
----------------------------------------
Michel Leunen
mailto:michel@leunen.com
http://www.leunen.com/cbuilder/
----------------------------------------
Technical Details
Message-ID: <3e7cc777@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!dca1-feed2.news.algx.net!allegiance!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3e7c812c@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,d497a474ac501d67
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-03-23 22:43:34 PST
Date: Sat, 22 Mar 2003 21:28:36 +0100
From: Michel Leunen <mleu@skynet.be>
Organization: http://www.leunen.com/cbuilder/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: XP Style
References: <3e7c812c@newsgroups.borland.com>
In-Reply-To: <3e7c812c@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 217.136.33.242
Message-ID: <3e7cc777@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1048364919 217.136.33.242 (22 Mar 2003 12:28:39 -0800)
Lines: 63
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!dca1-feed2.news.algx.net!allegiance!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail