... I need the backwards of FindWindow... I have the hwnd of a window and I want to know the window's class name... is there such a function?
Printable View
... I need the backwards of FindWindow... I have the hwnd of a window and I want to know the window's class name... is there such a function?
Yup, GetClassName.
More to the point...
VB Code:
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, _ ByVal lpClassName As String, _ ByVal nMaxCount As Long) _ As Long Private Sub Command1_Click() Dim s As String s = Space$(255) Call GetClassName(Command1.hwnd, s, Len(s)) If InStr(1, s, vbNullChar) Then s = Left$(s, InStr(1, s, vbNullChar) - 1) End If MsgBox s End Sub