Get and Set ListIcon Headers

Share your advanced PureBasic knowledge/code with the community.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Get and Set ListIcon Headers

Post by Karbon »

Code updated for 5.20+

Many thanks to Danilo!

Code: Select all

;     Structure LVCOLUMN
;       mask.l
;       fmt.l
;       cx.l
;       pszText.s
;       cchTextMax.l
;       iSubItem.l
;       iImage.l
;       iOrder.l
;     EndStructure


Procedure SetListIconColumnText(Gadget,index,HeaderText.s)
	
	lvc.LVCOLUMN
	lvc\mask    = #LVCF_TEXT
	lvc\pszText = @HeaderText
	SendMessage_(GadgetID(Gadget),#LVM_SETCOLUMN,index,@lvc)
	
EndProcedure


Procedure.s GetListIconColumnText(Gadget,index)
	Protected.s TempString			; temporary string for spaces
	lvc.LVCOLUMN
	lvc\mask = #LVCF_TEXT
	TempString = Space(255)
	lvc\pszText = @TempString
	lvc\cchTextMax = 255
	
	SendMessage_(GadgetID(Gadget),#LVM_GETCOLUMN,index,@lvc)
	
	ProcedureReturn PeekS(lvc\pszText)
	
EndProcedure
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

--Kale

Image
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Yep, there is a little bug in that lib that I've been trying to help Denis track down. It's not fixed yet but I'm sure it will be soon!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Denis
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post by Denis »

Hi Karbon

did you still have a bug under XP pro ?
As i tell you, it's working well with Win98 and XP home edition on my PC.
But i will continue to try to understand what's wrong. :wink:


Denis
A+
Denis
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Hey Denis, I just got back into town and will be testing the new lib in a few minutes! I'll drop you an email with the results!

Thanks!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Post Reply