Re: Manifest file for an Ocx

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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








.



Relevant Pages

  • Re: Manifest file for an Ocx
    ... Finally just add Minium.res as a Resource ... your EXE. ... Now to see if it works with an OCX! ... This has to have a User Control to host the controls for the ...
    (microsoft.public.vb.general.discussion)
  • Re: The bloated get bloatier
    ... I use my own customized version of the PDW ... My avoidance of controls is partly due to using ... The OCX really just uses a "wizard" to write the API ... If you want to use the Wise installer you could ...
    (microsoft.public.vb.general.discussion)
  • Re: The bloated get bloatier
    ... My avoidance of controls is partly due to using ... The OCX really just uses a "wizard" to write the API ... in the Redist folder with the next service pack. ... if you try to install a new system file it will get replaced. ...
    (microsoft.public.vb.general.discussion)
  • Re: OCX nutzen ohne Regestrierung durch Speichern im Applikationspfad ?
    ... > Verzeichnis wie die Exe installiert werden. ... Eine Registrierung des Controls gibt es immer, ... Dieter gesagten möchte ich anmerken dass nach der Registrierung ... Dein OCX immer im registriertem Pfad gesucht wird. ...
    (microsoft.public.de.vb)
  • Re: [Controls] ComboBoxEx
    ... > Why not use the ImageCombo from the Windows Common Controls OCX? ... > controls from this OCX, there's no point in not using the ImageCombo). ... CopyMemory nmCbex, ByVal lParam, Len ...
    (microsoft.public.vb.winapi)