Afternoon, All.

Attached is the masm32 example proggy "Listbox", with added code to colour the listbox.

Cheers,
Scronty

I've fixed the bugs which I'd purposely placed in the proggy and updated this attachment. It should work fine on NT 'puters now
Posted on 2002-04-29 00:38:05 by Scronty
Hey,
Doesn't work under XP too well aye. Sorry I dont have a screen capture but all I get is two black boxes which if I click comes up with a selected item (in the default blue bar, white text), but the rest of it is still black.

Seeya
Posted on 2002-04-29 00:59:31 by huh
Scronty, thats is great. I never saw nothing like that before. I want to do traparent or background with it. Do you know what numbers i will have to use. What is going on with XP where it is blocking plain basic 95 stuff. It took a lot of studing to find these great ideas. I guest XP forgot where it came from. Can you make it work for XP.
Posted on 2002-04-29 01:20:00 by cmax
Afternoon, huh.

?? I thought it *did* work in XP. The only problem that should arise is in the declarations of the colours. nt-type OSs *must* have the alpha byte set to FF.

Dunno why it's not working for you.
Anyone else with XP and it doesn't work?

Cheers,
Scronty
Posted on 2002-04-29 01:58:52 by Scronty
Got the same thing as huh on windows xp professional.
Posted on 2002-04-29 02:09:44 by Betrayed
?? I thought it *did* work in XP. The only problem that should arise is in the declarations of the colours.


It didn't work under win2k either until I set the most significant byte of the color values to zero.

nt-type OSs *must* have the alpha byte set to FF.


Where did you read that? SetTextColor wants a COLORREF value, and the docs on COLORREF say:
The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero.
Posted on 2002-04-29 02:20:20 by Thomas
Afternoon, Thomas.

heh. Thanks for that. How-the-!@$# did I miss that? I copied the code from the font-bitmap stuff and it *does* have the colour values as 000ffffffh (for white), etc. I must have changed it in my sleep somewhere :grin: .

Oh, well...I'll update that zip so that people won't have to d/load twice;p

Cheers,
Scronty
Posted on 2002-04-29 02:29:11 by Scronty
Afternoon, cmax.

What did you mean by...
I want to do traparent or background with it. Do you know what numbers i will have to use.
:confused:

A background image in the window and the listbox control transparent? or something else?

Cheers,
Scronty
Posted on 2002-04-30 02:20:00 by Scronty
Black as night with all the color scemes on NT4.
Posted on 2002-04-30 02:26:24 by The Svin
I changed high byte to zero and all works now.
Posted on 2002-04-30 02:31:52 by The Svin
Afternoon, The Svin.

heh. You must have d/loaded it before I updated it with the "feature" fixed.

As Thomas pointed out, the docs say that the highbyte (alpha)*must* be 00. Dunno what went wrong with my brain :grin: .

Cheers,
Scronty
Posted on 2002-04-30 05:13:43 by Scronty
Hi

I'm searching to color listbox too.. But your example is not avaible to download.

Could you repost it.

Thanks
Posted on 2007-01-07 09:05:21 by Bros
Hello,

Luckily Scronty gave some description of the file name and I've found it.
Attachments:
Posted on 2007-01-07 11:08:48 by roticv
To the Ineffable All,

    I have never been able to color the lines individually in a Listbox, whereas I can do so in a Listview box.  Ratch
Posted on 2007-01-07 11:52:23 by Ratch