Re: Manifest file for an Ocx
- From: "Jon Lewis" <jon.lewis@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Jul 2009 18:25:18 +0100
This doesn't appear to work for an OCX at least not in my context.
So second question remains - how to make a User Control in an activeX ocx
use xp style controls (triggering this from the OCX and not the app using
it).
Any ideas?
"Jon Lewis" <jon.lewis@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:OHX1yZuCKHA.4792@xxxxxxxxxxxxxxxxxxxxxxx
I found the answer to the first question as in this example: (for future
reference)
Create 3 text files
Minium.rc
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define RT_MANIFEST 24
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "Minium.exe.manifest"
Minium.exe.manifest
<?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="BVO.Minium.Console"
type="win32" />
<description>Minium Alerts Console</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*" />
</dependentAssembly>
</dependency>
</assembly>
{Note: file above has 2 spaces after last visible character, to pad to
DWord.}
makeres.bat
"C:\Program Files\Microsoft Visual Studio\VB98\Wizards\RC.EXE" /r /fo
Minium.res Minium.rc
Put all three files above into a folder with your VB6 project's files (or
a subfolder). Then run the BAT file. Finally just add Minium.res as a
Resource File via the Project Explorer's context menu in the VB6 IDE and
recompile your EXE.
Now to see if it works with an OCX!
"Jon Lewis" <jon.lewis@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23tYRRctCKHA.4004@xxxxxxxxxxxxxxxxxxxxxxx
I'm familiar with how to use a manifest file to get the XP controls feel
for a compiled VB6 exe, but how can I do the same for an Ocx written as
an add in, as naming it xxx.ocx.manifest doesn't work?
I've written an com add-in to create a Custom Task Pane for an Access2007
application. This has to have a User Control to host the controls for
the CTP. As is, these controls are not XP style and contrast with the
look of the Access application.
As a work around, I can use SetParent to make an Access form (hosting the
controls) a child of the User Control but this is not really robust
enough.
I've read that you can embed the manifest for an exe (vb) by adding it to
resource RES file. I've tried this (for an exe not an Ocx) with the vb
Resource Editor, adding the xxx.exe.manifest file as a custom resource
and setting Type 24 ID 1. 24 displays as a string "24" so I used
RT_MANIFEST instead. I can't get this to work. (I also padded the
manifest to an even number of 4 bytes BTW and tested that it works as a
separate file)
So (2 questions please) where am I going wrong with embedding the
mainifest for an exe and is it possible to apply/embed a manifext to an
ocx itself?
TIA
.
- References:
- Manifest file for an Ocx
- From: Jon Lewis
- Re: Manifest file for an Ocx
- From: Jon Lewis
- Manifest file for an Ocx
- Prev by Date: Re: Using a base window for all my windows.
- Next by Date: Re: Manifest file for an Ocx
- Previous by thread: Re: Manifest file for an Ocx
- Next by thread: Re: Manifest file for an Ocx
- Index(es):
Relevant Pages
|