RE: SysLink Control Problem



Hi Jeffrey.
I did get a standalone application working with the SysLink control in an
AboutBox. Then I moved the AboutBox into an Outlook addin DLL.

I followed the guidance in
http://msdn.microsoft.com/en-us/library/ms997646(printer).aspx for
“Extensions, Plugins, or a DLL That is Brought into a Process”.

I added the string ‘CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST
"mydll.manifest"’ to the .RC file and put the XML data into the file
mydll.manifest. When it compiles it creates a file called mydll.dll.manifest.

I put the file mydll.dll.manifest in the same directory as mydll.dll and ran
Outlook. When the AboutBox is displayed there is no SysLink drawn. Do you
have any ideas that would help debug this?
Thanks.

--
Mark Wilson



"Mark Wilson" wrote:

Thanks Jeffrey. That solved the problem. I had assumed that since I was
using Vista that getting ComCtl32.dll V6 would be automatic.

Also in http://msdn.microsoft.com/en-us/library/bb760706.aspx

The call to CreateWindow is not specifically UNICODE. Should it be
CreateWindowExW for clarity?

--
Mark Wilson



""Jeffrey Tan[MSFT]"" wrote:

Hi Mark,

Yes, I can reproduce this problem with your code. Actually, Richard is
correct; the problem is caused by not using the 6.0 version of ComCtl32.dll
while SysLink control is only defined in 6.0 version above ComCtrl32.dll.
This requirement is documented in the MSDN link below:
"The SysLink control is defined in the ComCtl32.dll version 6 and requires
a manifest or directive that specifies that version 6 of the DLL should be
used if it is available. See Enabling Visual Styles."
http://msdn.microsoft.com/en-us/library/bb760706(VS.85).aspx

To verify this, you may use Process Explorer and examine your running
application and view its "Dll Panel". Then you can find ComCtrl32.dll which
is not 6.0 version.

We can resolve this problem by adding the following "app.config" manifest
to the project:
"
<?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="CompanyName.ProductName.YourApp"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
"
Then, I go to project property dialog->"Configuration
Properties"->"Manifest Tool"->"Input and Output"->"Additional Manifest
Files" and specify the above manifest file "app.config". After compiling
the following code will show SysLink control correctly on the About dialog
now:

INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM
lParam)
{
UNREFERENCED_PARAMETER(lParam);
switch (message)
{
case WM_INITDIALOG:
HWND hwndLink;
INITCOMMONCONTROLSEX iccex;
iccex.dwSize = sizeof(INITCOMMONCONTROLSEX);
iccex.dwICC = ICC_LINK_CLASS;
InitCommonControlsEx(&iccex);

hwndLink = CreateWindowExW(0,
WC_LINK,
L"<A HREF=\"http://www.mycompany.com\";>Test</a>" ,
WS_VISIBLE | WS_CHILD | WS_TABSTOP,
10,55,120,30,
hDlg,
0,
hInst,
NULL);
return (INT_PTR)TRUE;
....
}

Hope this helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.




.



Relevant Pages

  • Make sure that you do the following:
    ... It turns out that you need not only the .dll files, but the .manifest files as well. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.debugging)
  • Make sure that you do the following:
    ... It turns out that you need not only the .dll files, but the .manifest files as well. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.debugging)
  • Make sure that you do the following:
    ... It turns out that you need not only the .dll files, but the .manifest files as well. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.debugging)
  • Make sure that you do the following:
    ... It turns out that you need not only the .dll files, but the .manifest files as well. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.debugging)
  • Re: refresh com control
    ... On the References tab I clicked the dll and then clicked remove. ... You would need to make sure that the new component was compiled with "Binary Compatibility". ... We welcome your comments and suggestions about how we can improve the support we provide to you. ... The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. ...
    (microsoft.public.dotnet.languages.vb)

Loading