Could anyone please enlighten me on how I might: 1. Change the background color of a listbox. 2. Right-Align text in a listbox. I looked on MS's website, and it said the style flag for right-alignment was 64 (if I remember correctly)... When I tried to "OR" this value with the other flags, I had no success. As for changing the background color, I'm completely lost. WM_DISABLE flag disables it, but doesn't gray it out. The listbox was created within a dialog template, if that matters any. I can live with the left-alignment, I suppose, but the white-while-disabled thing is annoying the hell out of me. Thanks in advance for any tips anyone can provide. Still hoping one of these days this connection will stay up long enough to download that API reference.
Posted on 2001-02-18 16:26:00 by Q
Could anyone please enlighten me on how I might: 1. Change the background color of a listbox. Very easy: .if uMsg == WM_CTLCOLORLISTBOX invoke SetBkMode,wParam,2 ; 1 = TRANSPARENT or 2 = OPAQUE invoke SetTextColor,wParam,00ffCF00h ; text color value invoke SetBkColor,wParam, 000000ffh ; Backgrn color value invoke CreateSolidBrush, 0000ff00h ; brush color value :) forge
Posted on 2001-02-19 01:05:00 by forge
Beautiful!! Solved the other problem just this morning. Thanks again.
Posted on 2001-02-19 04:03:00 by Q