December 03, 2020, 08:46:35 PM

Author Topic: [bb] SetListBoxBackground by Red [ 1+ years ago ]  (Read 548 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] SetListBoxBackground by Red [ 1+ years ago ]
« on: June 29, 2017, 12:28:40 AM »
Title : SetListBoxBackground
Author : Red
Posted : 1+ years ago

Description : [B+ v1.34]

Userlibs : /userlibs/user32.decls
Code: [Select]
SendMessage%(hwnd, msg, wParam, mParam):"SendMessageA"


functions : [/i]

Code :
Code: BlitzBasic
  1. ; ===========================
  2. ; Change background color
  3. ; ===========================
  4.  
  5. function SetListBoxBackground(lb,colorRGB%)
  6.         Local LVM_SETBKCOLOR=$1001
  7.         SendMessage(QueryObject(lb,1),LVM_SETBKCOLOR,0,InvertRGB(colorRGB))
  8. End Function
  9.  
  10. ; ===========================
  11. ; RGB(blitz) to BGR(win)
  12. ; ===========================
  13.  
  14. function InvertRGB%(rgb%)
  15.         Local r=(rgb And $0000FF) Shl 16
  16.         Local g=(rgb And $00FF00)
  17.         Local b=(rgb And $FF0000) Shr 16
  18.        
  19.         rgb=r Or g Or b
  20.         Return rgb
  21. End Function


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal