Results 1 to 9 of 9

Thread: XP Style: comctl32.ocx vs. mscomctl.ocx (RESOLVED)

  1. #1

    Thread Starter
    Addicted Member AlvaroF1's Avatar
    Join Date
    Sep 2002
    Location
    SP - Brazil
    Posts
    200

    Question XP Style: comctl32.ocx vs. mscomctl.ocx (RESOLVED)

    When I use the ListView from comctl32.ocx (MS Commom Controls 5.0 - SP2) with the manifest file, it works ok. But when I use the ListView from mscomctl.ocx (MS Commom Controls 6.0 - SP4), I can't get the XP style of this control.

    I can't use the control from comctl32.ocx because I need the GridLines feature.

    Any ideas?


    Thanks!
    Last edited by AlvaroF1; May 7th, 2003 at 10:57 PM.

  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Reference the comctl32.ocx library but don't add it to components; be sure to uncheck the "Remove Information about Unused ActiveX controls" in the Make area.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  3. #3

    Thread Starter
    Addicted Member AlvaroF1's Avatar
    Join Date
    Sep 2002
    Location
    SP - Brazil
    Posts
    200
    I think I wasn't clear.

    Well, I use VB 6 - SP5 and Windows XP Pro.

    I'm using the manifest file to get the XP sytle for my apps.

    The problem is when I use the ListView control from MS Commom Controls 6.0, it doesn't get the XP style. The only way to get it is using this control from MS Commom Controls 5.0. But, in this version, I can't get some important features like GridLines, FullRowSelect...

    I did just like mlewis said but it also doesn't work.


    Can anybody help me?

    Thanks.

  4. #4
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Your manifest has the wrong CLSID in it. Get the CLSID from your project file for the 6.0 comctl library and put that in the manifest file along with the old CLSID.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  5. #5

    Thread Starter
    Addicted Member AlvaroF1's Avatar
    Join Date
    Sep 2002
    Location
    SP - Brazil
    Posts
    200
    Originally posted by mlewis
    Your manifest has the wrong CLSID in it. Get the CLSID from your project file for the 6.0 comctl library and put that in the manifest file along with the old CLSID.
    Hummm... Thanks again mlewis. But where to change it?

    Code:
    <?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="Adecom Developer"
       type="win32"
    />
    <description>Adecom Developer</description>
    <dependency>
       <dependentAssembly>
         <assemblyIdentity
           type="win32"
           name="Microsoft.Windows.Common-Controls"
           version="6.0.0.0"
           processorArchitecture="X86"
           publicKeyToken="6595b64144ccf1df"
           language="*"
         />
       </dependentAssembly>
    </dependency>
    </assembly>

  6. #6
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Where did you get 6595b64144ccf1df from?

    Also, make sure that 6.0.0.0 is the right version that you reference in the project (it's not, btw -- the actual version is never all 0's ).
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  7. #7

    Thread Starter
    Addicted Member AlvaroF1's Avatar
    Join Date
    Sep 2002
    Location
    SP - Brazil
    Posts
    200
    All this code I got from MS's website.

    Do you know how to fix this code?

  8. #8
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Try finding the copy of comctl32.ocx that is on your system and getting its version number, then put that into the manifest and see if it works. Beyond that, I don't know
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  9. #9
    Addicted Member PhilRob56's Avatar
    Join Date
    Oct 2002
    Location
    New York
    Posts
    249

    Basically....

    I don't think it is going to work..
    I came across this statement recently:


    "This method is intended for Visual Basic 5 or Visual Basic 6 where the Common Control library used is the MSComCtl 5 version (comctl32.ocx). Because the VB6-specific mscomctl.ocx (Common Controls 6) is a complete implementation of comctl32.dll and not reliant on the version of comctl32.dll installed, this routine may not work when applied to a listview created from the VB6-specific mscomctl.ocx.
    Enhanced Comctl32 functionality is only available to users with comctl32.dll version 4.70 or greater installed. This dll is typically installed with IE3.x or greater.

    Visual Basic 6 users have extended functionality built-in to the newer mscomctl32.ocx, which does not rely on the Windows comctl32.dll. This code is targeted towards users opting for the older comctl32.ocx using comctl32.dll.



    Now, given that statement, it may explain why you can get the XP style from the older control but not the newer one. You just might have to trade something off. Maybe you can get the gridlines on the older control using some API calls?
    Some days you're the dog,
    and some days you're the hydrant.


    VB6 Enterprise

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width