| |
|
|
- 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 |
|
|
| |
|
|
|
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. |
|
|
| |
|
|