Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages
Started by Ellis
Sat, 22 Mar 2003 15:28
XP Style
Author: Ellis
Date: Sat, 22 Mar 2003 15:28
Date: Sat, 22 Mar 2003 15:28
7 lines
1076 bytes
1076 bytes
Hi everybody :) 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. Ellis
Re: XP Style
Author: Remy Lebeau (TeamB)
Date: Sat, 22 Mar 2003 20:22
Date: Sat, 22 Mar 2003 20:22
25 lines
1811 bytes
1811 bytes
The VCL does not natively support XP at all yet. The closest you can come with it, without resorting to making all of the new API calls yourself manually, is to just include a manifest file with your application, as per this article: Using Windows XP Visual Styles http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/userex/coo kbook.asp However, there are a few known quirks with using manifests with the existing VCL (such as drawing problems inside TListView, for example). Otherwise, have a look at TThemeManager as an alternative: http://www.lischke-online.de/ThemeManager.php Gambit "Ellis" <safariparty@hotmail.com> wrote in message news:3e7c812c@newsgroups.borland.com... > 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.
Re: XP Style
Author: Michel Leunen
Date: Sat, 22 Mar 2003 20:28
Date: Sat, 22 Mar 2003 20:28
62 lines
3309 bytes
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/ ----------------------------------------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads