How can I do this? I've tried IsWindowVisible() but that doesn't seem to do the job.
IsWindowVisible()
To check whether a window is minimized, use IsIconic(HWND).
IsIconic(HWND)