Give your application a XP look with a manifest | Utilisation d'un manifest pour avoir le look XP |
Here
is an example
of one of my application without a manifest and with a manifest: |
Voici
une example de ce que donne une de mes applications sans et avec un
manifest: |
BCB ( at least until version 6) has no support for XP! This means that the following may work or not, depending of what control you're using in your application. The manifest works well for components that are not owner-drawn. This means that only components that are pure wrappers around Windows controls will work. 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): | Jusqu'à
la version 6, C++ Builder ne supporte pas officiellement XP.Cela
signifie que la méthode suivante peut ou ne peut pas
fonctionner. Ca dépend du type de contrôle utilisé
dans votre application. Tous les composants qui ne sont pas du type
owner-draw vont fonctionner. Les autres pas. Si vous désirez
avoir le look XP, vous devez dire à Windows d'utiliser la
nouvelle comctrls 6.0 en incluant un manifest dans/avec votre
application. Le manifest doit avoir la forme suivante. Vous devez
changez dans le manifest "The_name_of_your_application" avec le nom de
votre application: |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
First way to
use that manifest: Put the manifest above in a file called "your_app.exe.manifest" and distribute it with your application. 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 application. Put the manifest above in a file, say "your_app.manifest". Create a .rc file containing this line: 1 24 "your_app.manifest"Add your .rc file to your project. Compile and link your resource with your application. |
Première
méthode: Mettez le manifest ci-dessus dans un fichier appelé "votre_app.exe.manfest" et distribuez ce fichier avec votre application. Windows teste à chaque démarrage de l'application s'il existe un manifest/ Seconde méthode: Incluez votre manifest directement en tant que ressource dans votre application en créant un fichier .rc contenant cette ligne: 1 24 "votre_app.manifest"Ajoutez ce fichier .rc à votre projet, compilez et linkez le tout. |
Since this only works with a limited number of BCB components, you'll need to test your application intensively to be sure it 'll look good with the manifest. Don't forget too that the window title bar is larger and the width and height of some controls are not the same so you could have to change the dimension of your form. | Etant
donné que cette technique ne fonctionne
qu'avec un nombre limité de composants, je vous invite donc
à tester votre application pour être sûr qu'elle
fonctionnera encore après avoir ajouté un manifest. Tenez
aussi compte du fait que la barre de titre des fenêtres sous XP
est plus large et que certain contrôles n'ont pas la même
taille. Vous devrez peut-être redimensionner votre forme. |