Code: Select all
Gui Add, ListView, HwndThisHWND, A|B
VarSetCapacity(Class, 512, 0)
DllCall("GetClassName", "Ptr", ThisHWND, "Str", Class, "Int", 256)
If (Class == "")
MsgBox Failed
Gui Destroy
ExitApp
Code: Select all
Gui Add, ListView, HwndThisHWND, A|B
VarSetCapacity(Class, 512, 0)
DllCall("GetClassName", "Ptr", ThisHWND, "Str", Class, "Int", 256)
If (Class == "")
MsgBox Failed
Gui Destroy
ExitApp
doubt thats the problem. also how would u even know if thats the case? u arent checking it. and no, If (Class == "") is not checking itit led me to breakdown the cause to the inability of GetClassName to get a handle on the ListView control based on its HWND.
so check the return val, A_LastError and since its DllCall were talking about might as well check ErrorLevel while ure at itgetclassname wrote:If the function fails, the return value is zero. To get extended error information, call GetLastError function.
Users browsing this forum: imstupidpleshelp, Rohwedder, ShatterCoder and 176 guests