Jump to content

Detecting listview item selection


Recommended Posts

I have attached an event to a ListView item, so that the status of move up/ move down buttons can be refreshed when a ListViewItem is selected. This works fine. However, the selection in the ListView can also be changed with the up/down arrow keys on the keyboard. The ListViewItem event does not fire if the arrow keys are used. Is there a better way to detect a change in the selection within a ListView control, using events? The code does not poll for messages. I tried attaching an event to the ListView control itself but it was not fired by using the arrow keys.

Best regards

Nick

Link to comment
Share on other sites

  • Moderators

Have you taken a look at GUIRegisterMsg()?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Listen for the notifications that are sent from the listview. I have to listen for the events to set a custom tooltip..

Use: ListView Controls Reference for more information on the various notifications and messages, and get Winspecter Spy from Winspecter Spy Downloads to listen for the messages and notifications.

Code Examples:

GUIRegisterMsg($WM_NOTIFY, "WM_Notify_Events")oÝ÷ Ù«­¢+ÙÕ¹]5}9½Ñ¥å}Ù¹ÑÌ ÀÌØí¡]¹U$°ÀÌØí5Í%°ÀÌØíÝAÉ´°ÀÌØí±AÉ´¤(½ÉÉÀÌØí¡]¹U$°ÀÌØí5Í%°ÀÌØíÝAÉ´(1½°ÀÌØíÙ¹Ð($ÀÌØíÑ95!HôÅÕ½Ðí¥¹Ðí¥¹Ðí¥¹ÐÅÕ½Ðì($ÀÌØíÑô±±MÑÉÕÑ
ÉÑ ÀÌØíÑ95!H°ÀÌØí±AÉ´¤($ÀÌØíÙ¹Ðô±±MÑÉÕÑÑÑ ÀÌØíѰ̤(M±Ð($%
ÍÀÌØíÝAÉ´ôÀÌØí±¥ÍÑÙ¥Ü($$%M±Ð($$$%
ÍÀÌØíÙ¹ÐôÀÌØí1Y9}Q%9=Q%Aí½È%¹½Q¥ÀÍÑÕ¡
¡¹¤($$%¹M±Ð(¹M±Ð(ÀÌØíÑ95!HôÀ(ÀÌØíÑôÀ(ÀÌØíÙ¹ÐôÀ(ÀÌØí±AÉ´ôÀ)IÑÕɸÀÌØíU%}IU95M)¹Õ¹ìôôÐí]5}9½Ñ¥å}Ù¹ÑoÝ÷ Ù8^±æ«zØ^r쵩í³*.Â)eç!ûayÊ'²Ö§¶+¢i×¢ëb¶+·w(§Ñ *'²Ö§¶Æ®ÞZºÚ"µÍÛØ[ÛÛÝ ÌÍÕÓWÓÕQHH
BÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÙ[XÈÓWÓÕQHÝYXØ][ÛÛÙÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛK_KRQKUKKKKKKKKKKKKKKKKKBÛØ[ÛÛÝ    ÌÍÓWÑTÕHËKKBÛØ[ÛÛÝ   ÌÍÓWÓTÕH
NNJHËKKBÛØ[ÛÛÝ    ÌÍÓWÓÕUÑQSSÔHH
    ÌÍÓWÑTÕHJHËKKBÛØ[ÛÛÝ ÌÍÓWÐÓPÒÈH
    ÌÍÓWÑTÕHHÓPÓPÒÈÝXÝÛØ[ÛÛÝ    ÌÍÓWÑÓÈH
    ÌÍÓWÑTÕHÊHËKKBÛØ[ÛÛÝ    ÌÍÓWÔUTH
    ÌÍÓWÑTÕH
HËKKBÛØ[ÛÛÝ   ÌÍÓWÔÓPÒÈH
    ÌÍÓWÑTÕH
JHÓPÓPÒÈÝXÝÛØ[ÛÛÝ    ÌÍÓWÔÓÈH
    ÌÍÓWÑTÕH
HËKKBÛØ[ÛÛÝ   ÌÍÓWÔÑUÐÕTÈH
    ÌÍÓWÑTÕH
ÊHËKKBÛØ[ÛÛÝ ÌÍÓWÒÒSÐÕTÈH
    ÌÍÓWÑTÕH
HËKKBÛØ[ÛÛÝ   ÌÍÓWÐÕTÕÓQUÈH
    ÌÍÓWÑTÕHLHËKKHQH  ÝÏHÌÛØ[ÛÛÝ  ÌÍÓWÒÕTH
    ÌÍÓWÑTÕHLÊHËKKHQH    ÝÏHÌÛØ[ÛÛÝ  ÌÍÓWÓÒUTÕH
    ÌÍÓWÑTÕHM
HÓSSÕTÑHÝXÝQH  ÝÏH
ÛØ[ÛÛÝ ÌÍÓWÒÑVQÕÓH
    ÌÍÓWÑTÕHMJHÓRÑVHÝXÝQH  ÝÏH
ÛØ[ÛÛÝ ÌÍÓWÔSPTÑQÐTTHH
    ÌÍÓWÑTÕHMHËKKHQH  ÝÏH
ÛØ[ÛÛÝ ÌÍÓWÔÑUÕTÓÔH
    ÌÍÓWÑTÕHMÊHÓSSÕTÑHÝXÝQH  ÝÏH
ÛØ[ÛÛÝ ÌÍÓWÐÒTH
    ÌÍÓWÑTÕHN
HÓPÒTÝXÝQH  ÝÏH
ÛØ[ÛÛÝ ÌÍÓWÕÓÓTÐÔPUQH
    ÌÍÓWÑTÕHNJHËKKBÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈ[ÙÈÜÛÛÛYÜØYÙHQÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛK_KRQKUKKKKKKKKKKKKKKKKKBßÛØ[ÛÛÝ    ÌÍÓWÑTÕHLÓÝY]ÂßÛØ[ÛÛÝ ÌÍÕÑTÕHLLÕYUY]ÂßÛØ[ÛÛÝ ÌÍÒWÑTÕHLÒXYßÛØ[ÛÛÝ ÌÍÕÓWÑTÕHLÌÕXÝßÛØ[ÛÛÝ    ÌÍÔÓWÑTÕHMÔYÙÝQH   ÝÏH
ßÛØ[ÛÛÝ   ÌÍÐÐÓWÑTÕHÐÛÛ[[ÛÝÚYQH  ÝÏH
ÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÓWÓÕQHÛÙÈ
RÛÙH[YÊBËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛK_KRQKUKKKKKKKKKKKKKKKKKBßÛØ[ÛÛÝ ÌÍÓWÑTÕH

HÑÙ[XÈ
[ÝÊBßÛØ[ÛÛÝ ÌÍÓWÓTÕH
NNJBÛØ[ÛÛÝ ÌÍÓÑTÕH
LL
HÓÝY]ÂÛØ[ÛÛÝ    ÌÍÓÓTÕH
LNNJBÛØ[ÛÛÝ    ÌÍÒÑTÕH
LÌ
HÒXYÛØ[ÛÛÝ    ÌÍÒÓTÕH
LÎNJBÛØ[ÛÛÝ   ÌÍÕÑTÕH
M
HÕY]Y]ÂÛØ[ÛÛÝ    ÌÍÕÓTÕH
MNJBÛØ[ÛÛÝ ÌÍÕÑTÕH
ML
HÕÛÛÂÛØ[ÛÛÝ    ÌÍÕÓTÕH
MMJBßÛØ[ÛÛÝ   ÌÍÕÓÑTÕH
MML
HÕXÛÛÛßÛØ[ÛÛÝ ÌÍÕÓÓTÕH
MN
BÔÚ[ÙY
MN
HH
MNJHÔÚ[ÙYÛØ[ÛÛÝ ÌÍÐÑÑTÕH
MJHÐÛÛ[[ÛX[ÙÈ
]ÊBÛØ[ÛÛÝ ÌÍÐÑÓTÕH
MNJBÛØ[ÛÛÝ ÌÍÕÑTÕH
MÌ
HÕÛÛÛØ[ÛÛÝ  ÌÍÕÓTÕH
MÌ
BÛØ[ÛÛÝ    ÌÍÕQÑTÕH
MÌJHÕÝÛÛØ[ÛÛÝ  ÌÍÕQÓTÕH
MÍ
BÛØ[ÛÛÝ    ÌÍÓPÓÑTÕH
MÍL
HÓ[ÛØ[QH ÝÏHÌÛØ[ÛÛÝ  ÌÍÓPÓÓTÕH
MÍNJBÛØ[ÛÛÝ   ÌÍÑÑTÕH
MÍ
HÑ]][YXÚÈQH  ÝÏHÌÛØ[ÛÛÝ  ÌÍÑÓTÕH
MÎNJBÛØ[ÛÛÝ   ÌÍÐÐSÑTÕH
N
HÐÛÛXÈÞ^QH ÝÏHÌÛØ[ÛÛÝ  ÌÍÐÐSÓTÕH
NÌ
BÛØ[ÛÛÝ    ÌÍÔÑTÕH
NÌJHÔXQH  ÝÏHÌÛØ[ÛÛÝ  ÌÍÔÓTÕH
N
NJBÛØ[ÛÛÝ  ÌÍÒTÑTÕH
N

HÒ[]YQH    ÝÏH
ÛØ[ÛÛÝ ÌÍÒTÓTÕH
N
ÎJBÛØ[ÛÛÝ ÌÍÔÐÑTÕH
N
HÔÝ]ÈQH  ÝÏH
ÛØ[ÛÛÝ ÌÍÔÐÓTÕH
NNJBÛØ[ÛÛÝ ÌÍÔÓÑTÕH
NL
HÔYÙÛÛÛQH  ÝÏH
ÛØ[ÛÛÝ ÌÍÔÓÓTÕH
NML
BÜYÚ[ÛYÚ[ÛØ[ÛÛÝ[XÛ][ÛÂÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÝY]ÈÝ[ÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛK_KRQKUKKKKKKKKKKKKKKKKKBßÛØ[ÛÛÝ ÌÍÓ×ÒPÓÓHËKKBßÛØ[ÛÛÝ  ÌÍÓ×ÔTÔHHËKKBßÛØ[ÛÛÝ   ÌÍÓ×ÔÓPSPÓÓHËKKBßÛØ[ÛÛÝ  ÌÍÓ×ÓTÕHÈËKKBÛØ[ÛÛÝ    ÌÍÓ×ÕTSPTÒÈHÈËKKBßÛØ[ÛÛÝ ÌÍÓ×ÔÒSÓTÑSH
ËKKBßÛØ[ÛÛÝ  ÌÍÓ×ÔÒÕÔÑSSÐVTÈHËKKBßÛØ[ÛÛÝ   ÌÍÓ×ÔÓÔTÐÑSSÈHLËKKBßÛØ[ÛÛÝ ÌÍÓ×ÔÓÔTÐÑSSÈHËKKBÛØ[ÛÛÝ    ÌÍÓ×ÔÒTRSPQÑSTÕÈH
ËKKBÛØ[ÛÛÝ    ÌÍÓ×ÓÓPSÔTHËKKBÛØ[ÛÛÝ  ÌÍÓ×ÐUUÐTSÑHHLËKKBßÛØ[ÛÛÝ ÌÍÓ×ÑQUPSÈHËKKBÛØ[ÛÛÝ   ÌÍÓ×ÓÕÓTUHHLËKKHQH  ÝÏHÌÛØ[ÛÛÝ  ÌÍÓ×ÓÔÐÔÓHËKKBÛØ[ÛÛÝ ÌÍÓ×ÕTTÕSSPTÒÈHÌËKKBÛØ[ÛÛÝ   ÌÍÓ×ÐSQÓÔHËKKBÛØ[ÛÛÝ   ÌÍÓ×ÐSQÓQHËKKBÛØ[ÛÛÝ    ÌÍÓ×ÐSQÓPTÒÈHÌËKKBÛØ[ÛÛÝ ÌÍÓ×ÓÕÓTUÑVQH
ËKKBßÛØ[ÛÛÝ  ÌÍÓ×ÓÐÓÓSSPQTH
ËKKBßÛØ[ÛÛÝ  ÌÍÓ×ÓÔÓÔPQTHËKKBÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÝY]È][HÝ]ÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛKKKKKKKKKKKKKKKKKKKKKKKKKKKKBßÛØ[ÛÛÝ   ÌÍÓT×ÑÐÕTÑQHHÑYÎ][HÈØÝÂßÛØ[ÛÛÝ  ÌÍÓT×ÔÑSPÕQHÑYÎ][HÈÙ[XÝYßÛØ[ÛÛÝ   ÌÍÓT×ÐÕUH
ÑYÎXÙYÜÝ]  [ÈÝBßÛØ[ÛÛÝ ÌÍÓT×ÑÔSUQHÑYÎÈYÈ [ÈÜÙ]ÛØ[ÛÛÝ ÌÍÓT×ÐPÕUUSÈHÓÝÝ[HÝÜYßÛØ[ÛÛÝ  ÌÍÓT×ÓÕTVSPTÒÈHÑYÎXÚÈHÝ^H[XYÙH[^ßÛØ[ÛÛÝ ÌÍÓT×ÔÕURSPQÑSPTÒÈHÑYÎXÚÈHÝ]H[XYÙH[^ÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÝY]ÈÙ]^][HYÜÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛKKKKKKKKKKKKKKKKKKKKKKKKKKKKBßÛØ[ÛÛÝ ÌÍÓWÐSHÑY][^][HH[^Ò][HÝ]HH[KÐ[ÔÛÛYHÙHÛÝÚ[È[YÎßÛØ[ÛÛÝ ÌÍÓWÑÐÕTÑQHHÒ][HÈ  ÌÍÓT×ÑÐÕTÑQYÈÙ]ßÛØ[ÛÛÝ  ÌÍÓWÔÑSPÕQHÒ][HÈ    ÌÍÓT×ÔÑSPÕQYÈÙ]ßÛØ[ÛÛÝ   ÌÍÓWÐÕUH
Ò][HÈ ÌÍÓT×ÐÕUYÈÙ]ßÛØ[ÛÛÝ   ÌÍÓWÑÔSUQHÒ][HÈ  ÌÍÓT×ÑÔSUQYÈÙ]ÔÙXÚÈH[^ßÛØ[ÛÛÝ ÌÍÓWÐPÕHHLÐXÝHHÜXÚYYY][KßÛØ[ÛÛÝ  ÌÍÓWÐSÕÈHÐ[ÝÈHÜXÚYYY][KßÛØ[ÛÛÝ ÌÍÓWÕÓQH
ÓYÙHÜXÚYYY][KßÛØ[ÛÛÝ  ÌÍÓWÕÔQÒHÔYÚÙHÜXÚYYY][KÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÝY]ÈÙ]][PÛÝ[YÜÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛKKKKKKKKKKKKKKKKKKKKKKKKKKKKBßÛØ[ÛÛÝ  ÌÍÓÒPÑÓÒSSQUPSHHÑÛÌÎNÝZ[[ÜÈ][HÈ[Y]ÂßÛØ[ÛÛÝ    ÌÍÓÒPÑÓÔÐÔÓHÑÛÌÎNÝØÜÛÚ[][HÛÝ[H
ÊËËKBÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÝY]ÈÙ][XYÙSÝYÜÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛKKKKKKKKKKKKKKKKKKKKKKKKKKKKBßÛØ[ÛÛÝ    ÌÍÓÒSÓÔPSHÓÙHXÛÛÂßÛØ[ÛÛÝ   ÌÍÓÒSÔÓPSHHÔÛX[XÛÛÂßÛØ[ÛÛÝ ÌÍÓÒSÔÕUHHÔÝ]H[XYÙÂÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÝY]È[ÙHYÜÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛKKKKKKKKKKKKKKKKKKKKKKKKKKKKBßÛØ[ÛÛÝ  ÌÍÓWÑQUSHÑY][[YÛHÝ[ßÛØ[ÛÛÝ ÌÍÓWÐSQÓQHHÐ[YÛ[ÛÈHYÙÚ[ÝÂßÛØ[ÛÛÝ ÌÍÓWÐSQÓÔHÐ[YÛ[ÛÈHÜÙÚ[ÝÂßÛØ[ÛÛÝ    ÌÍÓWÔÓTÑÔQH
HÔÛÈXÝÜYÜÚ][ÛÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÝY]ÈÙ]Y]ËÔÙ]Y]ÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛKKKKKKKKKKKKKKKKKKKKKKKKKKKKBßÛØ[ÛÛÝ   ÌÍÓÕQU×ÒPÓÓHËKKBßÛØ[ÛÛÝ  ÌÍÓÕQU×ÑURSÈHHËKKBßÛØ[ÛÛÝ ÌÍÓÕQU×ÔÓPSPÓÓHËKKBßÛØ[ÛÛÝ  ÌÍÓÕQU×ÓTÕHÈËKKBßÛØ[ÛÛÝ  ÌÍÓÕQU×ÕSHH
ËKKBÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÝY]ÈÓÓSSXÚÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛKKKKKKKKKKKKKKKKKKKKKKKKKKKKBßÛØ[ÛÛÝ    ÌÍÓÑÑUHHÕH]Y[XÈ[YßÛØ[ÛÛÝ   ÌÍÓÑÕÒQHÕHÞ^Y[XÈ[YßÛØ[ÛÛÝ    ÌÍÓÑÕVH
ÕHÞY[XÈ[YÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÝY]ÈÓÓSSÜX]ËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛKKKKKKKKKKKKKKKKKKKKKKKKKKKKBßÛØ[ÛÛÝ  ÌÍÓÑUÓQHÓY[YÛY^ßÛØ[ÛÛÝ ÌÍÓÑUÔQÒHHÔYÚ[YÛY^ßÛØ[ÛÛÝ    ÌÍÓÑUÐÑSTHÐÙ[Y^ÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÝY]È^[YÝ[ÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛK_KRQKUKKKKKK_U[XÛÙOËBßÛØ[ÛÛÝ ÌÍÓ×ÑVÑÔQSTÈHHËKKBßÛØ[ÛÛÝ    ÌÍÓ×ÑVÔÕPUSRSPQÑTÈHËKKBßÛØ[ÛÛÝ  ÌÍÓ×ÑVÐÒPÒÐÖTÈH
ËKKBßÛØ[ÛÛÝ  ÌÍÓ×ÑVÕPÒÔÑSPÕHËKKBßÛØ[ÛÛÝ ÌÍÓ×ÑVÒPQTQÑÔHLËKKBßÛØ[ÛÛÝ   ÌÍÓ×ÑVÑSÕÔÑSPÕHËKKBßÛØ[ÛÛÝ ÌÍÓ×ÑVÓÓPÓPÒÐPÕUUHH
ËKKBßÛØ[ÛÛÝ  ÌÍÓ×ÑVÕÓÐÓPÒÐPÕUUHHËKKBßÛØ[ÛÛÝ   ÌÍÓ×ÑVÑUÐHLËKKHQH   ÝÏH
ßÛØ[ÛÛÝ   ÌÍÓ×ÑVÔQÒSÓSHËKKHQH    ÝÏH
ßÛØ[ÛÛÝ   ÌÍÓ×ÑVÒSÕTH
ËKKHQH ÝÏH
ßÛØ[ÛÛÝ   ÌÍÓ×ÑVÕSTSRÕHËKKHQH ÝÏH
ßÛØ[ÛÛÝ   ÌÍÓ×ÑVÕSTSPÓÓHLËKKHQH  ÝÏH
ÛØ[ÛÛÝ ÌÍÓ×ÑVÓUSUÓÔÐTPTÈHËKKHQH ÝÏH
ÛØ[ÛÛÝ ÌÍÓ×ÑVÑÕPPQTHLËKKBÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈÝYXØ][ÛÈÛHHÝY]ÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛK_KRQKUKKKKKK_U[XÛÙOËBÛØ[ÛÛÝ    ÌÍÓÒUSPÒSÒSÈH
    ÌÍÓÑTÕL
HËKKBÛØ[ÛÛÝ   ÌÍÓÒUSPÒSÑQH
    ÌÍÓÑTÕLJHËKKBÛØ[ÛÛÝ  ÌÍÓÒSÑTUSHH
    ÌÍÓÑTÕLHËKKBÛØ[ÛÛÝ   ÌÍÓÑSURUSHH
    ÌÍÓÑTÕLÊHËKKBÛØ[ÛÛÝ ÌÍÓÑSUPSUSTÈH
    ÌÍÓÑTÕM
HËKKBÛØ[ÛÛÝ   ÌÍÓÐQÒSPSQUHH
    ÌÍÓÑTÕMJHËKKHÛ[XÛÙBÛØ[ÛÛÝ ÌÍÓÑSPSQUHH
    ÌÍÓÑTÕMHËKKHÛ[XÛÙBÛØ[ÛÛÝ  ÌÍÓÐÓÓSSÓPÒÈH
    ÌÍÓÑTÕN
HËKKBÛØ[ÛÛÝ   ÌÍÓÐQÒSQÈH
    ÌÍÓÑTÕNJHËKKBÛØ[ÛÛÝ  ÌÍÓÐQÒSQÈH
    ÌÍÓÑTÕLLJHËKKBÛØ[ÛÛÝ ÌÍÓÓÑÐPÒRSH
    ÌÍÓÑTÕLLÊHËKKHQH ÝÏHÌÛØ[ÛÛÝ  ÌÍÓÒUSPPÕUUHH
    ÌÍÓÑTÕLM
HËKKHQH    ÝÏHÌÛØ[ÛÛÝ  ÌÍÓÓÑÕUPÒSÑQH
    ÌÍÓÑTÕLMJHËKKHQH  ÝÏHÌÛØ[ÛÛÝ  ÌÍÓÒÕPÒÈH
    ÌÍÓÑTÕLJHËKKHQH   ÝÏH
ÛØ[ÛÛÝ ÌÍÓÑÑUTÔSÐHH
    ÌÍÓÑTÕML
HËKKHÛ[XÛÙBÛØ[ÛÛÝ  ÌÍÓÔÑUTÔSÐHH
    ÌÍÓÑTÕMLJHËKKHÛ[XÛÙBÛØ[ÛÛÝ    ÌÍÓÓÑSUSPHH
    ÌÍÓÑTÕMLHËKKHQH   ÝÏHÌÛ[XÛÙBÛØ[ÛÛÝ ÌÍÓÒÑVQÕÓH
    ÌÍÓÑTÕMMJHËKKBÛØ[ÛÛÝ ÌÍÓÓPTUQQPQÒSH
    ÌÍÓÑTÕMMHËKKHQH   ÝÏH
ÛØ[ÛÛÝ ÌÍÓÑÑUSÕTHH
    ÌÍÓÑTÕMMÊHËKKHQH ÝÏH
Û[XÛÙBÛØ[ÛÛÝ    ÌÍÓÑÑUSÕTÈH
    ÌÍÓÑTÕMN
HËKKHQH    ÝÏH
[XÛÙBÛØ[ÛÛÝ  ÌÍÓÐQÒSPSQUÈH
    ÌÍÓÑTÕMÍJHËKKH[XÛÙBÛØ[ÛÛÝ ÌÍÓÑSPSQUÈH
    ÌÍÓÑTÕMÍHËKKH[XÛÙBÛØ[ÛÛÝ  ÌÍÓÑÑUTÔSÕÈH
    ÌÍÓÑTÕMÍÊHËKKH[XÛÙBÛØ[ÛÛÝ    ÌÍÓÔÑUTÔSÕÈH
    ÌÍÓÑTÕMÎ
HËKKH[XÛÙBÛØ[ÛÛÝ    ÌÍÓÓÑSUSUÈH
    ÌÍÓÑTÕMÎJHËKKHQH ÝÏHÌ[XÛÙBÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈYÜØYÙÈÈHÝY]ÂËKKKKKKKKKKKKKKUXXKKKKKKKKKKKKKKKKKKK_KKKKKU[YKKKKKKKKKKKKK_KQØÜ[ÛK_KRQKUKKKKKK_U[XÛÙOËBßÛØ[ÛÛÝ ÌÍÓWÑÑUÐÓÓÔH
    ÌÍÓWÑTÕ
È
HËKKBßÛØ[ÛÛÝ ÌÍÓWÔÑUÐÓÓÔH
    ÌÍÓWÑTÕ
ÈJHËKKBßÛØ[ÛÛÝ  ÌÍÓWÑÑUSPQÑSTÕH
    ÌÍÓWÑTÕ
ÈHËKKBÛØ[ÛÛÝ ÌÍÓWÔÑUSPQÑSTÕH
    ÌÍÓWÑTÕ
ÈÊHËKKBßÛØ[ÛÛÝ ÌÍÓWÑÑUUSPÓÕSH
    ÌÍÓWÑTÕ
È
HËKKBßÛØ[ÛÛÝ ÌÍÓWÑÑUUSPHH
    ÌÍÓWÑTÕ
È
JHËKKHÛ[XÛÙBÛØ[ÛÛÝ ÌÍÓWÔÑUUSPHH
    ÌÍÓWÑTÕ
È
HËKKHÛ[XÛÙBßÛØ[ÛÛÝ    ÌÍÓWÒSÑTUSPHH
    ÌÍÓWÑTÕ
È
ÊHËKKHÛ[XÛÙBßÛØ[ÛÛÝ  ÌÍÓWÑSURUSHH
    ÌÍÓWÑTÕ
È
HËKKBßÛØ[ÛÛÝ ÌÍÓWÑSUPSUSTÈH
    ÌÍÓWÑTÕ
ÈJHËKKBßÛØ[ÛÛÝ  ÌÍÓWÑÑUÐSPÒÓPTÒÈH
    ÌÍÓWÑTÕ
ÈL
HËKKBßÛØ[ÛÛÝ ÌÍÓWÔÑUÐSPÒÓPTÒÈH
    ÌÍÓWÑTÕ
ÈLJHËKKBßÛØ[ÛÛÝ ÌÍÓWÑÑUVUSHH
    ÌÍÓWÑTÕ
ÈLHËKKBÛØ[ÛÛÝ    ÌÍÓWÑSUSPHH
    ÌÍÓWÑTÕ
ÈLÊHËKKHÛ[XÛÙBÛØ[ÛÛÝ ÌÍÓWÑÑUUSTPÕH
    ÌÍÓWÑTÕ
ÈM
HËKKBßÛØ[ÛÛÝ ÌÍÓWÔÑUUSTÔÒUSÓH
    ÌÍÓWÑTÕ
ÈMJHËKKBÛØ[ÛÛÝ   ÌÍÓWÑÑUUSTÔÒUSÓH
    ÌÍÓWÑTÕ
ÈMHËKKBÛØ[ÛÛÝ    ÌÍÓWÑÑUÕSÕÒQHH
    ÌÍÓWÑTÕ
ÈMÊHËKKHÛ[XÛÙBÛØ[ÛÛÝ ÌÍÓWÒUTÕH
    ÌÍÓWÑTÕ
ÈN
HËKKBßÛØ[ÛÛÝ ÌÍÓWÑSÕTUTÒPHH
    ÌÍÓWÑTÕ
ÈNJHËKKBßÛØ[ÛÛÝ ÌÍÓWÔÐÔÓH
    ÌÍÓWÑTÕ
È
HËKKBßÛØ[ÛÛÝ ÌÍÓWÔQUÒUSTÈH
    ÌÍÓWÑTÕ
ÈJHËKKBßÛØ[ÛÛÝ  ÌÍÓWÐTSÑHH
    ÌÍÓWÑTÕ
ÈHËKKBßÛØ[ÛÛÝ   ÌÍÓWÑQUPSHH
    ÌÍÓWÑTÕ
ÈÊHËKKHÛ[XÛÙBßÛØ[ÛÛÝ    ÌÍÓWÑÑUQUÓÓÓH
    ÌÍÓWÑTÕ
È
HËKKBÛØ[ÛÛÝ   ÌÍÓWÑÑUÓÓSSHH
    ÌÍÓWÑTÕ
ÈJHËKKHÛ[XÛÙBßÛØ[ÛÛÝ ÌÍÓWÔÑUÓÓSSHH
    ÌÍÓWÑTÕ
ÈHËKKHÛ[XÛÙBßÛØ[ÛÛÝ  ÌÍÓWÒSÑTÓÓSSHH
    ÌÍÓWÑTÕ
ÈÊHËKKHÛ[XÛÙBßÛØ[ÛÛÝ    ÌÍÓWÑSUPÓÓSSH
    ÌÍÓWÑTÕ
È
HËKKBßÛØ[ÛÛÝ ÌÍÓWÑÑUÓÓSSÒQH
    ÌÍÓWÑTÕ
ÈJHËKKBßÛØ[ÛÛÝ  ÌÍÓWÔÑUÓÓSSÒQH
    ÌÍÓWÑTÕ
ÈÌ
HËKKBßÛØ[ÛÛÝ ÌÍÓWÑÑUPQTH
    ÌÍÓWÑTÕ
ÈÌJHËKKBÛØ[ÛÛÝ  ÌÍÓWÐÔPUQQÒSPQÑHH
    ÌÍÓWÑTÕ
ÈÌÊHËKKBßÛØ[ÛÛÝ   ÌÍÓWÑÑUQUÔPÕH
    ÌÍÓWÑTÕ
ÈÍ
HËKKBÛØ[ÛÛÝ   ÌÍÓWÑÑUVÓÓÔH
    ÌÍÓWÑTÕ
ÈÍJHËKKBßÛØ[ÛÛÝ    ÌÍÓWÔÑUVÓÓÔH
    ÌÍÓWÑTÕ
ÈÍHËKKBÛØ[ÛÛÝ   ÌÍÓWÑÑUVÐÓÓÔH
    ÌÍÓWÑTÕ
ÈÍÊHËKKBßÛØ[ÛÛÝ   ÌÍÓWÔÑUVÐÓÓÔH
    ÌÍÓWÑTÕ
ÈÎ
HËKKBßÛØ[ÛÛÝ ÌÍÓWÑÑUÔSVH
    ÌÍÓWÑTÕ
ÈÎJHËKKBßÛØ[ÛÛÝ    ÌÍÓWÑÑUÓÕSTQÑHH
    ÌÍÓWÑTÕ
È

HËKKBÛØ[ÛÛÝ   ÌÍÓWÑÑUÔQÒSH
    ÌÍÓWÑTÕ
È
JHËKKBßÛØ[ÛÛÝ    ÌÍÓWÕTUHH
    ÌÍÓWÑTÕ
È
HËKKBßÛØ[ÛÛÝ ÌÍÓWÔÑUUSTÕUHH
    ÌÍÓWÑTÕ
È
ÊHËKKBßÛØ[ÛÛÝ   ÌÍÓWÑÑUUSTÕUHH
    ÌÍÓWÑTÕ
È

HËKKBßÛØ[ÛÛÝ ÌÍÓWÑÑUUSUVHH
    ÌÍÓWÑTÕ
È

JHËKKHÛ[XÛÙBßÛØ[ÛÛÝ   ÌÍÓWÔÑUUSUVHH
    ÌÍÓWÑTÕ
È

HËKKHÛ[XÛÙBßÛØ[ÛÛÝ    ÌÍÓWÔÑUUSPÓÕSH
    ÌÍÓWÑTÕ
È

ÊHËKKBÛØ[ÛÛÝ ÌÍÓWÔÓÔUSTÈH
    ÌÍÓWÑTÕ
È

HËKKBÛØ[ÛÛÝ   ÌÍÓWÔÑUUSTÔÒUSÓÌH
    ÌÍÓWÑTÕ
È
JHËKKBßÛØ[ÛÛÝ    ÌÍÓWÑÑUÑSPÕQÓÕSH
    ÌÍÓWÑTÕ
È
L
HËKKBÛØ[ÛÛÝ   ÌÍÓWÑÑUUSTÔPÒSÈH
    ÌÍÓWÑTÕ
È
LJHËKKBÛØ[ÛÛÝ ÌÍÓWÑÑUTÑPTÒÕSÐHH
    ÌÍÓWÑTÕ
È
LHËKKBßÛØ[ÛÛÝ    ÌÍÓWÔÑUPÓÓÔPÒSÈH
    ÌÍÓWÑTÕ
È
LÊHËKKBßÛØ[ÛÛÝ  ÌÍÓWÔÑUVSQTÕQUÔÕSHH
    ÌÍÓWÑTÕ
È
M
HÛÜ[Û[Ô[HOHXÚÂßÛØ[ÛÛÝ   ÌÍÓWÑÑUVSQTÕQUÔÕSHH
    ÌÍÓWÑTÕ
È
MJHËKKBßÛØ[ÛÛÝ   ÌÍÓWÑÑUÕPUSTPÕH
    ÌÍÓWÑTÕ
È
MHËKKBÛØ[ÛÛÝ  ÌÍÓWÔÕPUSRUTÕH
    ÌÍÓWÑTÕ
È
MÊHËKKBßÛØ[ÛÛÝ  ÌÍÓWÔÑUÓÓSSÔTTVHH
    ÌÍÓWÑTÕ
È
N
HËKKBßÛØ[ÛÛÝ ÌÍÓWÑÑUÓÓSSÔTTVHH
    ÌÍÓWÑTÕ
È
NJHËKKBßÛØ[ÛÛÝ   ÌÍÓWÔÑUÕUSHH
    ÌÍÓWÑTÕ
È

HËKKBßÛØ[ÛÛÝ ÌÍÓWÑÑUÕUSHH
    ÌÍÓWÑTÕ
È
JHËKKBÛØ[ÛÛÝ  ÌÍÓWÔÑUÕÕTÓÔH
    ÌÍÓWÑTÕ
È
HËKKBßÛØ[ÛÛÝ ÌÍÓWÑÑUÕÕTÓÔH
    ÌÍÓWÑTÕ
È
ÊHËKKBÛØ[ÛÛÝ ÌÍÓWÐTÖSPUUQUÔPÕH
    ÌÍÓWÑTÕ
È

HËKKBÛØ[ÛÛÝ   ÌÍÓWÔÑUÓÔÐTPTÈH
    ÌÍÓWÑTÕ
È
JHËKKBÛØ[ÛÛÝ  ÌÍÓWÑÑUÑSPÕSÓPTÈH
    ÌÍÓWÑTÕ
È
HËKKBÛØ[ÛÛÝ   ÌÍÓWÔÑUÑSPÕSÓPTÈH
    ÌÍÓWÑTÕ
È
ÊHËKKBÛØ[ÛÛÝ ÌÍÓWÔÑUÒSPQÑPHH
    ÌÍÓWÑTÕ
È

HËKKBÛØ[ÛÛÝ   ÌÍÓWÑÑUÒSPQÑPHH
    ÌÍÓWÑTÕ
È
JHËKKBÛØ[ÛÛÝ  ÌÍÓWÑÑUÓÔÐTPTÈH
    ÌÍÓWÑTÕ
È
Ì
HËKKBßÛØ[ÛÛÝ ÌÍÓWÔÑUÕTSQHH
    ÌÍÓWÑTÕ
È
ÌJHËKKBßÛØ[ÛÛÝ  ÌÍÓWÑÑUÕTSQHH
    ÌÍÓWÑTÕ
È
ÌHËKKBÛØ[ÛÛÝ ÌÍÓWÑÑUSPTÑÓÔÐTPTÈH
    ÌÍÓWÑTÕ
È
ÌÊHËKKBÛØ[ÛÛÝ   ÌÍÓWÔÑUÓÓTÈH
    ÌÍÓWÑTÕ
È
Í
HËKKBÛØ[ÛÛÝ   ÌÍÓWÑÑUUSUÈH
    ÌÍÓWÑTÕ
È
ÍJHËKKH[XÛÙBÛØ[ÛÛÝ ÌÍÓWÔÑUUSUÈH
    ÌÍÓWÑTÕ
È
ÍHËKKH[XÛÙBÛØ[ÛÛÝ  ÌÍÓWÒSÑTUSUÈH
    ÌÍÓWÑTÕ
È
ÍÊHËKKH[XÛÙBÛØ[ÛÛÝ    ÌÍÓWÑÑUÓÓTÈH
    ÌÍÓWÑTÕ
È
Î
HËKKBÛØ[ÛÛÝ   ÌÍÓWÑSUSUÈH
    ÌÍÓWÑTÕ
ÈÊHËKKH[XÛÙBÛØ[ÛÛÝ    ÌÍÓWÑÑUÕSÕÒQÈH
    ÌÍÓWÑTÕ
È
ÊHËKKH[XÛÙBÛØ[ÛÛÝ  ÌÍÓWÑÑUÓÓSSÈH
    ÌÍÓWÑTÕ
ÈMJHËKKH[XÛÙBÛØ[ÛÛÝ    ÌÍÓWÔÑUÓÓSSÈH
    ÌÍÓWÑTÕ
ÈMHËKKH[XÛÙBÛØ[ÛÛÝ ÌÍÓWÒSÑTÓÓSSÈH
    ÌÍÓWÑTÕ
ÈMÊHËKKH[XÛÙBÛØ[ÛÛÝ   ÌÍÓWÑÑUUSUVÈH
    ÌÍÓWÑTÕ
ÈLMJHËKKH[XÛÙBÛØ[ÛÛÝ   ÌÍÓWÔÑUUSUVÈH
    ÌÍÓWÑTÕ
ÈLMHËKKH[XÛÙBÛØ[ÛÛÝ    ÌÍÓWÑÑUTÑPTÒÕSÕÈH
    ÌÍÓWÑTÕ
ÈLMÊHËKKH[XÛÙBÛØ[ÛÛÝ  ÌÍÓWÑQUPSÈH
    ÌÍÓWÑTÕ
ÈLN
HËKKH[XÛÙBÛØ[ÛÛÝ    ÌÍÓWÔÑUÒSPQÑUÈH
    ÌÍÓWÑTÕ
ÈLÎ
HËKKH[XÛÙBÛØ[ÛÛÝ    ÌÍÓWÑÑUÒSPQÑUÈH
    ÌÍÓWÑTÕ
ÈLÎJHËKKH[XÛÙBÛØ[ÛÛÝ  ÌÍÓWÔÑUSÕTH
    ÌÍÓWÑTÕ
ÈMÌÊHËKKBßÛØ[ÛÛÝ  ÌÍÓWÑÑUSPÓÑQÔPUH    ÌÍÐÐÓWÑÑUSPÓÑQÔPUËKKHÛ[XÛÙBßÛØ[ÛÛÝ  ÌÍÓWÔÑUSPÓÑQÔPUH    ÌÍÐÐÓWÔÑUSPÓÑQÔPUËKKHÛ[XÛÙBßÛØ[ÛÛÝ  ÌÍÓWÑQUPSH  ÌÍÓWÑQUPSHËKKHÛ[XÛÙBßÛØ[ÛÛÝ   ÌÍÓWÑÑUÒSPQÑHH   ÌÍÓWÑÑUÒSPQÑPHËKKHÛ[XÛÙBßÛØ[ÛÛÝ    ÌÍÓWÑÑUTÑPTÒÕSÈH   ÌÍÓWÑÑUTÑPTÒÕSÐHËKKHÛ[XÛÙBßÛØ[ÛÛÝ    ÌÍÓWÑÑUUSHH    ÌÍÓWÑÑUUSPHËKKHÛ[XÛÙBßÛØ[ÛÛÝ ÌÍÓWÒSÑTUSHH   ÌÍÓWÒSÑTUSPHËKKHÛ[XÛÙBßÛØ[ÛÛÝ    ÌÍÓWÔÑUÒSPQÑHH   ÌÍÓWÔÑUÒSPQÑPHËKKHÛ[XÛÙBßÛØ[ÛÛÝ    ÌÍÓWÔÑUUSHH    ÌÍÓWÔÑUUSPHËKKHÛ[XÛÙBßÛØ[ÛÛÝ ÌÍÓWÑQUPSH  ÌÍÓWÑQUPSÈËKKH[XÛÙBÛØ[ÛÛÝ  ÌÍÓWÑÑUÒSPQÑHH   ÌÍÓWÑÑUÒSPQÑUÈËKKH[XÛÙBÛØ[ÛÛÝ   ÌÍÓWÑÑUTÑPTÒÕSÈH   ÌÍÓWÑÑUTÑPTÒÕSÕÈËKKH[XÛÙBÛØ[ÛÛÝ   ÌÍÓWÑÑUUSHH    ÌÍÓWÑÑUUSUÈËKKH[XÛÙBÛØ[ÛÛÝ    ÌÍÓWÒSÑTUSHH   ÌÍÓWÒSÑTUSUÈËKKH[XÛÙBÛØ[ÛÛÝ   ÌÍÓWÔÑUÒSPQÑHH   ÌÍÓWÔÑUÒSPQÑUÈËKKH[XÛÙBÛØ[ÛÛÝ   ÌÍÓWÔÑUUSHH    ÌÍÓWÔÑUUSUÈËKKH[XÛÙ

There you go, a wealth of information. It only took me 48+ hours to dig that all up and convert it to autoit from C++ when I needed it.

Link to comment
Share on other sites

:nuke: Someone did their homework :P

Yeah, a localized MSDN helps alot, as well as having commctrl.h from VC++6 and Dev-C++ (different structure) commctrl.h is alot easier to read from VC++6.

One of these days, I will get around to writing a few listview UDF functions, like infotips.

Link to comment
Share on other sites

Suggest keeping it simple for most users:

; Events - ListView
#include <GuiConstants.au3>;Inclusion file for the GUI interface controls
#include <GuiListView.au3>

Global $ListView
Global Const $WM_NOTIFY = 0x004E
Global Const $DebugIt = 1

;ListView Events
Global Const $NM_FIRST = 0
Global Const $NM_LAST = (-99)
Global Const $NM_OUTOFMEMORY = ($NM_FIRST - 1)
Global Const $NM_CLICK = ($NM_FIRST - 2)
Global Const $NM_DBLCLK = ($NM_FIRST - 3)
Global Const $LVN_FIRST = -100;
Global Const $LVN_ITEMCHANGED = ($LVN_FIRST-1);

#endregion End Global variables

Opt("WinTitleMatchMode", 2)

$main_GUI = GUICreate("GuiRegisterMsg Test", 225, 400, 300, 10, BitOR($WS_THICKFRAME, $WS_SIZEBOX))

$ListView = GUICtrlCreateListView("Entry Name|Category", 5, 75, 195, 280, BitOR($LVS_SORTASCENDING, $LVS_SINGLESEL))
_GUICtrlListViewSetColumnWidth ($ListView, 0, 100)
_GUICtrlListViewSetColumnWidth ($ListView, 1, 100)
GUICtrlSendMsg($ListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES)
GUICtrlSendMsg($ListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT)
GUICtrlCreateListViewItem("Name 1|Category 1", $ListView)
GUICtrlCreateListViewItem("Name 2|Category 2", $ListView)
GUISetState()

;Register WM_NOTIFY  events
GUIRegisterMsg($WM_NOTIFY, "WM_Notify_Events")

While 1
   
   $msg = GUIGetMsg()
   
   Switch $msg
      
    ;-----------------------------------------------------------------------------------------
    ;This case statement exits and updates code if needed
      Case $GUI_EVENT_CLOSE
         Exit
         
         
       ;-----------------------------------------------------------------------------------------
       ;put all the misc. stuff here
        Case Else
            ;;;
   EndSwitch
WEnd

Func ListView_Click()
    ;----------------------------------------------------------------------------------------------
    If $DebugIt Then    _DebugPrint ("$NM_CLICK")
    ;----------------------------------------------------------------------------------------------
EndFunc   ;==>ListView_Click

Func ListView_DoubleClick()
    ;----------------------------------------------------------------------------------------------
    If $DebugIt Then    _DebugPrint ("$NM_DBLCLK")
    ;----------------------------------------------------------------------------------------------
    MsgBox(0,"Double Clicked", _GUICtrlListViewGetItemText ($ListView, _GUICtrlListViewGetSelectedIndices($ListView)))
EndFunc   ;==>ListView_DoubleClick

Func ListView_ItemChanged()
    ;----------------------------------------------------------------------------------------------
    If $DebugIt Then    _DebugPrint ("$LVN_ITEMCHANGED: " & _GUICtrlListViewGetItemText ($ListView, _GUICtrlListViewGetSelectedIndices($ListView)))
    ;----------------------------------------------------------------------------------------------
EndFunc

;
; WM_NOTIFY event handler
Func WM_Notify_Events($hWndGUI, $MsgID, $wParam, $lParam)
    #forceref $hWndGUI, $MsgID, $wParam
    Local $tagNMHDR, $event, $hwndFrom, $code
    $tagNMHDR = DllStructCreate("int;int;int", $lParam) ;NMHDR (hwndFrom, idFrom, code)
    If @error Then Return
    $event = DllStructGetData($tagNMHDR, 3)
    Select
    Case $wParam = $ListView
        Select
            Case $event = $NM_CLICK
                ListView_Click ()
            Case $event = $NM_DBLCLK
                ListView_DoubleClick ()
            Case $event = $LVN_ITEMCHANGED
                ListView_ItemChanged()
            EndSelect
    EndSelect
    $tagNMHDR = 0
    $event = 0
    $lParam = 0
EndFunc   ;==>WM_Notify_Events

Func _DebugPrint($s_text)
    $s_text = StringReplace($s_text, @LF, @LF & "-->")
    ConsoleWrite("!===========================================================" & @LF & _
            "+===========================================================" & @LF & _
            "-->" & $s_text & @LF & _
            "+===========================================================" & @LF)
EndFunc   ;==>_DebugPrint

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

@gafrost

Is there any simple way to set custom infotips per item in a listview? Because if there is, I sure missed that one when I started digging through MSDN and commctrl.h

Besides, those constants should be able to be found on the forums, not everyone has 48+ hours to find and convert constants for a single listview control.

Link to comment
Share on other sites

@gafrost

Is there any simple way to set custom infotips per item in a listview? Because if there is, I sure missed that one when I started digging through MSDN and commctrl.h

Besides, those constants should be able to be found on the forums, not everyone has 48+ hours to find and convert constants for a single listview control.

infotips is not as easy as what the user asked for, sometimes it does take a lot of research and trial and error to get it to work.

Haven't had time to work on that one again.

For the above example, I already had a snippet with the click and double click events, just added the changed event.

Took maybe 2 minutes to add.

1st: I looked at http://msdn.microsoft.com/library/default....ndivcontrol.asp

2nd: I use API Viewer 2004 for most declaration values.

Gary

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

ApiViewer 2004 pulls an Application Error (Memory can't be written) everytime I try to run it, so I had/have to do it all the hard way.

Sorry to hear that, never had that problem.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Thanks to all your help, I got GUIRegisterMsg() to work great, but I could not find out how to un-register again. I only need this notification for one window while it is active. I tried it with only the first parameter or with an empty function name, but it doesn't like either of those. Any suggestions?

I am also seeing a strange effect. I used gafrosts example above to implement an event handler. When I left-click and release slowly on a row in the ListView (e.g. holding the button more than 0.5 sec), it works fine. But if I left-click and release quickly, it starts a drag operation, as if the mouse-up event had been missed. Is there a way to prevent this effect? The handler updates the ListView control during processing, so I implemented a mutex to prevent re-entry, but it made no difference.

Regards

Nick

Edited by Nick Duffill
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...