Author Topic: How to set "item" text color in a list-view control  (Read 14664 times)

dedndave

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: How to set "item" text color in a list-view control
« Reply #15 on: June 18, 2012, 09:39:39 AM »
very cool, Rob   :t

Gunner

  • Regular Member
  • *
  • Posts: 48
    • Gunners Software
Re: How to set "item" text color in a list-view control
« Reply #16 on: June 18, 2012, 09:51:50 AM »
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

  • Guest
Re: How to set "item" text color in a list-view control
« Reply #17 on: June 18, 2012, 11:03:55 AM »
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

  • Regular Member
  • *
  • Posts: 48
    • Gunners Software
Re: How to set "item" text color in a list-view control
« Reply #18 on: June 18, 2012, 11:37:37 AM »
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

  • Regular Member
  • *
  • Posts: 48
    • Gunners Software
Re: How to set "item" text color in a list-view control
« Reply #19 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
~Rob

NoCforMe

  • Guest
Re: How to set "item" text color in a list-view control
« Reply #20 on: June 18, 2012, 11:57:04 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

  • Regular Member
  • *
  • Posts: 48
    • Gunners Software
Re: How to set "item" text color in a list-view control
« Reply #21 on: June 18, 2012, 12:01:46 PM »
For XP and above, you don't need Owner Draw, Custom Draw works as it should.
~Rob