English
Source / code snippets

Angeklicktes detect Item List view Subitem

 
- Page 1 -



Jörg
Sellmeyer
herewith I get of course The row out but How I get whom index the angeklickten Items?
 $H windows.ph
 $H commctrl.ph
Struct LVHitTestInfo = X&,Y&,flags&,Item&,SubItem&
Declare LVHTI#,LView&
Dim LVHTI#,LVHitTestInfo

Proc LV_HitTest

    Parameters  LV&,X%,Y%
    ~GetCursorPos(LVHTI#)
    ~ScreenToClient(LV&,LVHTI#)
    Return SendMessage(LV&,~LVM_HITTEST,0,LVHTI#)

ENDPROC

Cls
LView& = Create("GridBox",%hwnd,"Test;0;100;Test1;0;100",0,100,10,210,200)

WhileLoop 0,4

    AddStrings(LView&,"0 Test " + Str $(&Loop) + "|1 Test " + Str $(&Loop))

Wend

While 1

    WaitInput
    Print LV_HitTest(LView&,%mousex,%mousey)

Wend

 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/21/08  
 



« this Posting watts as Solution marked. »


Jörg
Sellmeyer
super! the stood none in the Win32.hlp what about me thought, one should nor by the others Structures read.
so GEHTS now:
 $H windows.ph
 $H commctrl.ph
Struct LVHitTestInfo = X&,Y&,flags&,Item&,SubItem&
Declare LVHTI#,LView&,l%
Dim LVHTI#,LVHitTestInfo

Proc LV_HitTest

    Parameters  LV&,X%,Y%
    ~GetCursorPos(LVHTI#)
    ~ScreenToClient(LV&,LVHTI#)
    SendMessage(LV&,~LVM_SUBITEMHITTEST,0,LVHTI#)
    Return LVHTI#.SubItem&

ENDPROC

Cls
LView& = Create("GridBox",%hwnd,"Test 0;0;100;Test 1;0;100;Test 2;0;100;Test 3;0;100",0,200,10,410,200)

WhileLoop 0,4

    AddStrings(LView&,"0 Test " + Str $(&Loop) + "|1 Test " + Str $(&Loop) + "|2 Test " + Str $(&Loop) + "|3 Test " + Str $(&Loop))

Wend

While 1

    WaitInput
    Cls
    l% =  LV_HitTest(LView&,%mousex,%mousey)
    Case l% > -1:Print GetText$(LView&,LVHTI#.Item&,LVHTI#.SubItem&)

Wend

LVM_SUBITEMHITTEST
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/21/08  
 




Frank
Abbing
LVM_SUBITEMHITTEST
 
08/21/08  
 




Jörg
Sellmeyer
super! the stood none in the Win32.hlp what about me thought, one should nor by the others Structures read.
so GEHTS now:
 $H windows.ph
 $H commctrl.ph
Struct LVHitTestInfo = X&,Y&,flags&,Item&,SubItem&
Declare LVHTI#,LView&,l%
Dim LVHTI#,LVHitTestInfo

Proc LV_HitTest

    Parameters  LV&,X%,Y%
    ~GetCursorPos(LVHTI#)
    ~ScreenToClient(LV&,LVHTI#)
    SendMessage(LV&,~LVM_SUBITEMHITTEST,0,LVHTI#)
    Return LVHTI#.SubItem&

ENDPROC

Cls
LView& = Create("GridBox",%hwnd,"Test 0;0;100;Test 1;0;100;Test 2;0;100;Test 3;0;100",0,200,10,410,200)

WhileLoop 0,4

    AddStrings(LView&,"0 Test " + Str $(&Loop) + "|1 Test " + Str $(&Loop) + "|2 Test " + Str $(&Loop) + "|3 Test " + Str $(&Loop))

Wend

While 1

    WaitInput
    Cls
    l% =  LV_HitTest(LView&,%mousex,%mousey)
    Case l% > -1:Print GetText$(LView&,LVHTI#.Item&,LVHTI#.SubItem&)

Wend

LVM_SUBITEMHITTEST
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/21/08  
 




Frank
Abbing
The Win32.hlp is in manchen reaches unvollständig. in the Zweifelsfall still with MSDN look over.
 
08/22/08  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.958 Views

Untitledvor 0 min.
Gast.081508/25/24
Member 862464105/13/24
Axel Berse02/18/19
rquindt03/23/18
More...

Themeninformationen

this Topic has 2 subscriber:

Frank Abbing (2x)
Jörg Sellmeyer (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie