Re: XPManifest
- From: Rob Kennedy <me3@xxxxxxxxxxx>
- Date: Tue, 18 Jul 2006 02:29:34 -0500
AdamMaynard24 wrote:
What exactly does XPManifest do? There's no help on it, and it doesn't
seem to have any interesting properties or change the look of my
application.
The component itself doesn't do anything at all. Take a look at the source code. The unit is nearly empty. What you'll see in that unit, though, is something you won't see in most other units. It has a $R directive to include a resource file. That resource file contains a manifest, so when your program uses that unit, the manifest resource is linked to your program.
When Windows XP loads your program, it detects that resource and changes its behavior accordingly. The manifest tells the OS which version of the Common Controls library to use. By default, the OS will use version 5, which does not do any theming. The manifest requests version 6, which is where all the themed drawing takes place.
When you place a component on a form, the IDE automatically adds that component's unit to the form unit's "uses" clause. The TXPManifest component simply takes advantage of that behavior. Add that component to a form, and the necessary unit gets used. The unit drags in the resource.
Note that removing the component does _not_ remove the resource. That's because the IDE does not automatically remove units the same way it adds them. If you added a TXPManifest component and later deleted it, you'll need to remove mention of the XPManifest unit yourself.
(under windows 2000 anyway). Perhaps it only functions
under XP?
Well, duh.
--
Rob
.
- Follow-Ups:
- Re: XPManifest
- From: AdamMaynard24
- Re: XPManifest
- Next by Date: Re: Need help with typecasting in delphi!
- Next by thread: Re: XPManifest
- Index(es):
Relevant Pages
|