Valhalla Legends Forums Archive | General Programming | comctl32.dll versions...

AuthorMessageTime
BreW
Apparently, to be able to use an hbitmap as the source for the background image pf a listview with the LVM_SETBKIMAGE message, you must have version 6.0 or higher of comctl32.dll, however I only have 5.82, which according to this, 5.82 is the most current version. Note 4 of that page says the following:
[quote]
ComCtl32.dll version 6 is not redistributable. If you want your application to use ComCtl32.dll version 6, you must add an application manifest that indicates that version 6 should be used if it is available.
[/quote]
Well, seeing as how the highest version is 5.82, how is version 6 going to be available? Does microsoft think that people don't need this type of functionality?

Also, I've noticed visual basic can do a ton of things with no problems that I would have, for example when the WS_EX_TRANSPARENT style is set on a RichEdit control in vb6, it works just fine. However, when I do the same myself, the text blurs when moved, and must be invalidated then redrawn. I would have no problem with redrawing it, but the problem is that I don't know when. Then there's the problem with the listview items' back color. In vb6, this is no problem. The text is drawn right to the listview without the box around the text. However, I can't do the same- It asks for a colorref, and a colorref I must give. After toying around with it a bit, I find that making the color -1 does the trick, however, like any null brush, it would draw whatever was previously drawn over it until the picture is redrawn.
All in all, my project is a royal gdi wreck. Help would be appreciated!
July 15, 2008, 5:07 AM
Barabajagal
You sure it's not talking about the Product Version instead of the File Version?
July 15, 2008, 5:13 AM
BreW
I had no idea there was a difference. Reguardless, SendMessage() LVM_SETBKIMAGE with LVBKIF_SOURCE_HBITMAP always fails.
July 15, 2008, 5:30 AM
Myndfyr
To select version 6 you need to use an assembly manifest.  Refer to this article for more information.
July 15, 2008, 7:49 AM
BreW
I don't think MSVC6 has the ability to include manifests. It seems like so much work, so I dropped that and ended up storing the image filenames instead and dynamically loading them. It may be a little slower, but hey, that's to be expected with bitmap operations, right?
Does anyone have any clue when the proper time is to repaint the richedit when the hdc is changed?
July 15, 2008, 6:21 PM
Barabajagal
You can just create a .exe.manifest file and put it in the same directory as the exe...
July 15, 2008, 6:57 PM
Myndfyr
[quote author=brew link=topic=17569.msg178934#msg178934 date=1216146061]
I don't think MSVC6 has the ability to include manifests. It seems like so much work, so I dropped that and ended up storing the image filenames instead and dynamically loading them. It may be a little slower, but hey, that's to be expected with bitmap operations, right?
Does anyone have any clue when the proper time is to repaint the richedit when the hdc is changed?
[/quote]
It also begs the question: why are you still on VC6?  It's not like the new versions of Visual C++ cost money.  And you'd get the added benefit of new libraries and headers designed to prevent security flaws, not to mention 10 years of compiler advancements and optimizations, 64-bit support, and a far superior IDE.

I don't get it.  "I'm going to program for Windows but I'm going to stand on 'principle' and boycott the best tools I can do just to make it harder on myself."
July 15, 2008, 7:50 PM
BreW
[quote author=brew link=topic=17569.msg178930#msg178930 date=1216098445]
Then there's the problem with the listview items' back color. In vb6, this is no problem. The text is drawn right to the listview without the box around the text. However, I can't do the same- It asks for a colorref, and a colorref I must give. After toying around with it a bit, I find that making the color -1 does the trick, however, like any null brush, it would draw whatever was previously drawn over it until the picture is redrawn.
[/quote]
Resolved- I had to send an LVM_SETTEXTBKCOLOR with CLR_NONE as the lParam. Who would've guessed that!

Now for the rest of my gdi troubles...

@Myndfyre: I was thinking of switching to msvc8. It's tempting, it's just that I'm so familiar with MSVC6's ide.. perhaps if there was a way to just update the compiler etc? Besides, even if I do try to update msvc, I don't think it would let me. I applied the SP2 connection limit patch to my computer, and usually microsoft anything installers error saying that I need to reinstall my OS.
July 15, 2008, 8:54 PM
l2k-Shadow
so why don't u just patch it back? only thing the patch does is change an int inside tcpip.sys
July 16, 2008, 1:31 AM
BreW
Because I refuse to unpatch my tcpip.sys to please some retarded installer.
July 16, 2008, 1:42 AM
Quarantine
[quote author=brew link=topic=17569.msg178939#msg178939 date=1216172538]
Because I refuse to unpatch my tcpip.sys to please some retarded installer.
[/quote]

everything brew posts should be redirected to the fun forum
July 16, 2008, 7:42 AM

Search