| |
|
|
- page 1 - |
|
 Jörg Sellmeyer | Hiermit bekomme je zwar qui la ligne raus mais comment bekomme Je l' index des angeklickten Items?
$H Windows.ph
$H commctrl.ph
Struct LVHitTestInfo = X&,Y&,flags&,Item&,SubItem&
Déclarer LVHTI#,LView&
Faible LVHTI#,LVHitTestInfo
Proc LV_HitTest
Paramètres LV&,X%,Y%
~GetCursorPos(LVHTI#)
~ScreenToClient(LV&,LVHTI#)
Retour SendMessage(LV&,~LVM_HITTEST,0,LVHTI#)
ENDPROC
Cls
LView& = Créer("GridBox",%hwnd,"Test;0;100;Test1;0;100",0,100,10,210,200)
WhileLoop 0,4
AddStrings(LView&,"0 Test " + Str$(&Boucle) + "|1 Test " + Str$(&Boucle))
Wend
Tandis que 1
WaitInput
Imprimer LV_HitTest(LView&,%mousex,%mousey)
Wend
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 21.08.2008 ▲ |
|
|
|
 |
« cette Beitrag wurde comme Solution gekennzeichnet. » |
|
 Jörg Sellmeyer | Super! cela stand gar pas dans qui Win32.hlp et je dachte, on devrait ou par le autre Strukturen auslesen. So gehts maintenant:
$H Windows.ph
$H commctrl.ph
Struct LVHitTestInfo = X&,Y&,flags&,Item&,SubItem&
Déclarer LVHTI#,LView&,l%
Faible LVHTI#,LVHitTestInfo
Proc LV_HitTest
Paramètres LV&,X%,Y%
~GetCursorPos(LVHTI#)
~ScreenToClient(LV&,LVHTI#)
SendMessage(LV&,~LVM_SUBITEMHITTEST,0,LVHTI#)
Retour LVHTI#.SubItem&
ENDPROC
Cls
LView& = Créer("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$(&Boucle) + "|1 Test " + Str$(&Boucle) + "|2 Test " + Str$(&Boucle) + "|3 Test " + Str$(&Boucle))
Wend
Tandis que 1
WaitInput
Cls
l% = LV_HitTest(LView&,%mousex,%mousey)
Cas l% > -1:Imprimer 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! cela stand gar pas dans qui Win32.hlp et je dachte, on devrait ou par le autre Strukturen auslesen. So gehts maintenant:
$H Windows.ph
$H commctrl.ph
Struct LVHitTestInfo = X&,Y&,flags&,Item&,SubItem&
Déclarer LVHTI#,LView&,l%
Faible LVHTI#,LVHitTestInfo
Proc LV_HitTest
Paramètres LV&,X%,Y%
~GetCursorPos(LVHTI#)
~ScreenToClient(LV&,LVHTI#)
SendMessage(LV&,~LVM_SUBITEMHITTEST,0,LVHTI#)
Retour LVHTI#.SubItem&
ENDPROC
Cls
LView& = Créer("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$(&Boucle) + "|1 Test " + Str$(&Boucle) + "|2 Test " + Str$(&Boucle) + "|3 Test " + Str$(&Boucle))
Wend
Tandis que 1
WaitInput
Cls
l% = LV_HitTest(LView&,%mousex,%mousey)
Cas l% > -1:Imprimer 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 | qui Win32.hlp ist dans manchen Bereichen unvollständig. Im Zweifelsfall doch encore chez MSDN nachsehen. |
|
|
| |
|
|