RE: SysLink Control Problem



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

  • RE: ASP.Net timeouts
    ... There's no managed call stack on the thread that throws this exception. ... Microsoft Online Support ... You can send feedback directly to my manager at: ... nature are best handled working with a dedicated Microsoft Support Engineer ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Theming not working in DLL
    ... the resource ID for a manifest in a DLL is typically different ... Microsoft Online Community Support ... You can send feedback directly to my manager at: ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.win32.programmer.ui)
  • Re: Why does this XPath not work
    ... Regarding on the error "Namespace manager or XsltContext needed." ... components only implemented XPATH 1.0 and XSLT 1.0 function set, ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.xml)
  • RE: element of Clickonce application manifest
    ... manifest and also automatically generates the hash signatures. ... more information on how to include a data file in a ClickOnce application, ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.general)
  • RE: Linking Mixed Mode and Managed Assemblies
    ... public void f ... Microsoft Online Community Support ... You can send feedback directly to my manager at: ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.vc)

Loading