|
Post by ppro06 on Jun 1, 2020 0:32:41 GMT -5
Hello Everyone, I had a look at the listview APIs and they have worked very well. I have been able to get a handle to the header but I can't apply my desired styles because of them being undefined constants, please tell me if it is possible in LB to apply a constant with prefix 0x.
hHeader = SendMessage(listViewHandle(0), 4127, 0, 0) styles = GetWindowLong(hHeader, _GWL_STYLE) '_GWL_STYLE = -16 print "SetWindowLong() - "; SetWindowLong(hHeader, _GWL_STYLE, styles | _HDS_FILTERBAR) '_HDS_FILTERBAR = 0x0100
Function GetWindowLong(hWnd, index) CallDLL #user32, "GetWindowLongA", hWnd As ulong, _ index As long, _ GetWindowLong As long print GetWindowLong;" GetWindowLong" print hWnd ;" hWnd" End Function
Function SetWindowLong(hWnd, index, dwNewLong) CallDLL #user32, "SetWindowLongA",_ hWnd as long,_ index as long,_ dwNewLong as long,_ SetWindowLong as long End Function
|
|
|
Post by Chris Iverson on Jun 1, 2020 1:14:48 GMT -5
You can, but you have to specify it in a way that LB can understand.
A 0x-prefixed value is specified in hexadecimal, so you can use the hexdec() function in LB to properly assign the value to a numeric variable.
HDS.FILTERBAR = hexdec("0100")
(Note that you have to take off the 0x prefix before using it in LB)
|
|
|
Post by ppro06 on Jun 1, 2020 1:42:43 GMT -5
Thanks, will try it out.
|
|