Code: Select all
LB_GetCount(Byref control){
GuiControlGet,hLB,Hwnd,control
return DllCall("SendMessage", "uint", hLB, "uint", 0x18B) ; LB_GETCOUNT
}
Code: Select all
LB_GetCount(Byref control){
GuiControlGet,hLB,Hwnd,control
return DllCall("SendMessage", "uint", hLB, "uint", 0x18B) ; LB_GETCOUNT
}
Code: Select all
LB_GetCount(Byref control, indicator := ""){
if (indicator = "HANDLE")
hLB := control
else
GuiControlGet,hLB,Hwnd,control
return DllCall("SendMessage", "uint", hLB, "uint", 0x18B) ; LB_GETCOUNT
}
Gui, Add, ListBox, vLB hwndhLB, A|B|C|D
Gui, Add, Button,, Test
Gui, Show
Return
GuiClose:
GuiEscape:
ExitApp
ButtonTest:
MsgBox, % LB_GetCount(LB)
MsgBox, % LB_GetCount(hLB, "HANDLE")
Return
Code: Select all
LB_GetCount(Byref control){
if control is number
hLB := control
else
GuiControlGet,hLB,Hwnd,control
return DllCall("SendMessage", "uint", hLB, "uint", 0x18B) ; LB_GETCOUNT
}
Code: Select all
isHwnd(hwnd){
return DllCall("IsWindow", "Ptr", hwnd)
}
Users browsing this forum: FanaticGuru, OrangeCat and 127 guests