WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Window Manipulation

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

; 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
File Created: 1999:04:15:16:53:36
Last Updated: 1999:04:15:16:53:36