Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


; This code, for 32 bit WinBatch, will turn a window title ;into a class name
win = "Exploring"

If !(WinExist(win))
  Message("Window not found", win)
  Exit
Endif

hwnd = DllHwnd(win)
bufsize = 200
buf = BinaryAlloc(bufsize)
BinaryEodSet(buf, bufsize)
DllCall("user32.dll", word:"GetClassNameA", long:hwnd, lpbinary:buf, word:
bufsize)
class = BinaryPeekStr(buf, 0, bufsize - 1)
buf = BinaryFree(buf)

Message("Class name", class)



Article ID:   W13373
Filename:   Obtain the Window Class Name.txt