Problème à l'utilisation de WM_Notify.
Posté : dim. 17 avr. 2016 14:09
Bonjour à tous.
Je cherche à gérer les double-clics sur les items d'une ListBox. Visiblement ça ne marche pas. Je ne vais pas mettre la totalité du script mais j'ai ceci :
A l'exécution la fonction WM_Notify n'est même pas appelée. Quelqu'un peut-il m'expliquer ce qu'il manque pour que WM_Notify soit appelée ?
Merci.
Je cherche à gérer les double-clics sur les items d'une ListBox. Visiblement ça ne marche pas. Je ne vais pas mettre la totalité du script mais j'ai ceci :
Code : Tout sélectionner
GUIRegisterMsg($WM_NOTIFY, "WM_Notify")
;... ici le reste du script...
Func WM_Notify($hWnd, $iMsg, $wParam, $lParam)
#forceref $hWnd, $iMsg, $wParam, $lParam
Local $tInfo, $iCode
$tInfo = DllStructCreate($tagNMHDR, $lParam)
$hWnd = HWnd(DllStructGetData($tInfo, "hWndFrom"))
$iCode = DllStructGetData($tInfo, "Code")
Switch $hWnd
Case GUICtrlGetHandle($list_Dir)
Switch $iCode
Case $NM_DBLCLK ; Double-clic sur la liste de répertoires.
MsgBox($MB_OK, "DBLCLK", "DBLCLK")
ListDirItemClicked()
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc
Merci.