The Win32 API provides the GetTitleBarInfo function which returns a TITLEBARINFO Structure:
typedef struct {
DWORD cbSize;
RECT rcTitleBar;
DWORD rgstate[CCHILDREN_TITLEBAR+1];
} TITLEBARINFO, *PTITLEBARINFO, *LPTITLEBARINFO;
So you could check the rgstate
: Pointer to an array that receives a DWORD value for each element of the title bar. The following are the title bar elements represented by the array.
Index Title Bar Element
----- --------------------
0 The title bar itself
1 Reserved.
2 Minimize button
3 Maximize button <--------------
4 Help button
5 Close button
Each array element is a combination of one or more of the following values.
Value Meaning
----- -------------------------------------------
STATE_SYSTEM_FOCUSABLE The element can accept the focus.
STATE_SYSTEM_INVISIBLE The element is invisible.
STATE_SYSTEM_OFFSCREEN The element has no visible representation.
STATE_SYSTEM_UNAVAILABLE The element is unavailable.
STATE_SYSTEM_PRESSED The element is in the pressed state.rgstate