Fullrowselect in ListView-control (VB4 32) 
Author Message
 Fullrowselect in ListView-control (VB4 32)

I've used the following code to enable highlight of an entire row in a
listview-control (report-style).

Public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" _
       (ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal _  
       lParam As Long) As Long
Public Const LVM_FIRST = &H1000
Public Const LVS_EX_FULLROWSELECT = &H20
Public Const LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54
Public Const LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55
Public Const LVS_FULLROWSELECT = &H20
rstyle = SendMessageLong(lvwUcode.hwnd, LVM_GETEXTENDEDLISTVIEWSTYLE, 0&, 0&)
rstyle = rstyle Or LVS_FULLROWSELECT
r = SendMessageLong(lvwUcode.hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0&, rstyle)
rstyle = SendMessageLong(lvwProjects.hwnd, LVM_GETEXTENDEDLISTVIEWSTYLE, _
       0&, 0&)
rstyle = rstyle Or LVS_FULLROWSELECT
r = SendMessageLong(lvwProjects.hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0&, _
       rstyle)

This works fine in Windows NT 4.0 but in W95 the entire row is not selected
(just the item clicked).

Does anybody know why??

Espen Stromsnes
_____________________________________________________________
Work: NM Data AS, P.O. Box 9090 Gronland, N-0133 Oslo, NORWAY
Home: Brenneriveien 1B, N-0182 Oslo, Norway
_____________________________________________________________



Tue, 05 Oct 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB4.0(32) Sorting a Listview Control

2. VB4/32 ListView-Control

3. VB4-32: Full rowselect in ListView-control

4. ListView control and FullRowSelect

5. Setting FullRowSelect on a ListView Control

6. How do I Set Focus to ListView in VB4/32

7. Data Control vs Remote Data Control (for Axx95 and VB4/32 Enterprise)

8. Non-MS ListView 32-bit control?

9. Non-MS ListView 32-bit control?

10. listview & fullrowselect

11. How to select entire row in ListView ? - FullRowSelect

12. Problem Setting Listview's FullRowSelect Style

 

 
Powered by phpBB® Forum Software