I used GetWindowLong window api to get current window state of a window in c#.
[DllImport("user32.dll")]
static extern int GetWindowLong(IntPtr hWnd, int nIndex);
Process[] processList = Process.GetProcesses();
foreach (Process theprocess in processList)
{
long windowState = GetWindowLong(theprocess.MainWindowHandle, GWL_STYLE);
MessageBox.Show(windowState.ToString());
}
I expected to get numbers on http://www.autohotkey.com/docs/misc/Styles.htm, but I get numbers like -482344960, -1803550644, and 382554704.
Do I need to convert windowState variable?? if so, to what?