// Helper method static BOOL IsButtonEnabled(HWND hParent, DWORD id) { if( hParent==NULL ) return FALSE; ICustButton* but = GetICustButton(GetDlgItem(hParent,id)); BOOL retval = but->IsEnabled(); ReleaseICustButton(but); return retval; }