I have the hwnd of a button in another app. I click it using PostMessage, and it works like gangbusters. The problem is that PostMessage won't care whether the button is enabled or not; it'll assume it worked even when disabled.

So I need to know how to tell if a button is enabled or not using its hwnd. Any help?