| |
|
|
- Página 1 - |
|
 Jörg Sellmeyer | Hiermit bekomme Yo zwar el Línea fuera aber como bekomme Yo, el Index des angeklickten Items?
$H Windows.ph
$H commctrl.ph
Struct LVHitTestInfo = X&,Y&,flags&,Item&,SubItem&
Declarar LVHTI#,LView&
Dim LVHTI#,LVHitTestInfo
Proc LV_HitTest
Parámetros LV&,X%,Y%
~GetCursorPos(LVHTI#)
~ScreenToClient(LV&,LVHTI#)
Volver SendMessage(LV&,~LVM_HITTEST,0,LVHTI#)
ENDPROC
Cls
LView& = Crear("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
Mientras que 1
WaitInput
Imprimir LV_HitTest(LView&,%mousex,%mousey)
Wend
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 21.08.2008 ▲ |
|
|
|
 |
« Dieser Contribución wurde como Solución gekennzeichnet. » |
|
 Jörg Sellmeyer | Super! Das stand nada en el Win32.hlp y yo pensamiento, uno müßte ni por el otro Estructuras auslesen. So gehts ahora:
$H Windows.ph
$H commctrl.ph
Struct LVHitTestInfo = X&,Y&,flags&,Item&,SubItem&
Declarar LVHTI#,LView&,l%
Dim LVHTI#,LVHitTestInfo
Proc LV_HitTest
Parámetros LV&,X%,Y%
~GetCursorPos(LVHTI#)
~ScreenToClient(LV&,LVHTI#)
SendMessage(LV&,~LVM_SUBITEMHITTEST,0,LVHTI#)
Volver LVHTI#.SubItem&
ENDPROC
Cls
LView& = Crear("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
Mientras que 1
WaitInput
Cls
l% = LV_HitTest(LView&,%mousex,%mousey)
Case l% > -1:Imprimir GetText $(LView&,LVHTI#.Item&,LVHTI#.SubItem&)
Wend
LVM_SUBITEMHITTEST
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 21.08.2008 ▲ |
|
|
 |
|
|
 Frank Abbing | LVM_SUBITEMHITTEST  |
|
|
| |
|
|
|
 Jörg Sellmeyer | Super! Das stand nada en el Win32.hlp y yo pensamiento, uno müßte ni por el otro Estructuras auslesen. So gehts ahora:
$H Windows.ph
$H commctrl.ph
Struct LVHitTestInfo = X&,Y&,flags&,Item&,SubItem&
Declarar LVHTI#,LView&,l%
Dim LVHTI#,LVHitTestInfo
Proc LV_HitTest
Parámetros LV&,X%,Y%
~GetCursorPos(LVHTI#)
~ScreenToClient(LV&,LVHTI#)
SendMessage(LV&,~LVM_SUBITEMHITTEST,0,LVHTI#)
Volver LVHTI#.SubItem&
ENDPROC
Cls
LView& = Crear("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
Mientras que 1
WaitInput
Cls
l% = LV_HitTest(LView&,%mousex,%mousey)
Case l% > -1:Imprimir GetText $(LView&,LVHTI#.Item&,LVHTI#.SubItem&)
Wend
LVM_SUBITEMHITTEST
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 21.08.2008 ▲ |
|
|
|
|
 Frank Abbing | El Win32.hlp es en manchen Bereichen unvollständig. Im Zweifelsfall todavía en MSDN nachsehen. |
|
|
| |
|
|