News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

How to set "item" text color in a list-view control

Started by NoCforMe, June 12, 2012, 07:20:16 AM

Previous topic - Next topic

dedndave


Gunner

I am enjoying writing tutorials  ;)  When I start, I always say to myself "What am I going to write?".  I break the code down and the words just flow.  At some point, I have to figure out where to stop, as there is so much to write about.

Glad folks like it!  :t
~Rob

NoCforMe

First of all, let me say nice job documenting that. Very helpful.

But before we go further, I wonder if it's a problem that I'm using Windows 2000 (Pro). Here's what I see when I run your tutorial app:

Is this correct? Notice there are no labels on the first two header columns, and nothing happens when I click on them. Is that because my OS is out of date?

(BTW, I have version 5.81.3502 of comctl32.dll, if that tells you anything.)

Gunner

Fired up both VMs - with Win2K and XP.
Win2K
No text unless I specifically add it in InsertLVColumns and you can't click the columns, Win2k is a bit outdated.  There comes a time when you cannot support all OS's.

XP
No text unless I added it also in InsertLVColumns and you can click column 2.  That is the only one I wrote code for, you have to write code for whatever else :-)  It is just to get you started.
~Rob

Gunner

I guess for 2k, you will have to do Owner Draw since the "cool" stuff comes with later OS's
~Rob

NoCforMe

Quote from: Gunner on June 18, 2012, 11:43:27 AM
I guess for 2k, you will have to do Owner Draw since the "cool" stuff comes with later OS's
Well, more precisely, I'd have to use owner draw if I want to mess around with the header. My little demo posted up there shows that I can manipulate the listview control itself just fine using custom draw.

Guess it's finally time to fire up that "new" XP computer of mine ... shame, really, since Win2K does about 95% of what I need it to do.

Gunner

For XP and above, you don't need Owner Draw, Custom Draw works as it should.
~Rob