BOOL IsButton(const HWND hwnd) { char szClass[100]; GetClassName(hwnd, szClass, sizeof(szClass)); return lstrcmpi(szClass, "BUTTON") == 0; }
Programming Tips - Win32: Is a control a button or other type
Date: 2023nov2
Platform: win32
Language: C/C++
Q. Win32: Is a control a button or other type
A. Use the win32 function GetClassName() - eg: