If I got the other software's Menu handle,but i want to know Menu's MenuItem whether is checked state or unchecked state,how to use windows api to get the other software's MenuItem state.
[DllImport("user32.dll")]
public static extern int GetMenuState(int hMenu, int wID, int wFlags);
private int MF_BYPOSITION = 0x400;
int it = GetMenuState(menuHandle, 2, MF_BYPOSITION );
I'm sure the menuHandle value is correct,but return value it aways equals -1,i can't find out the reason.
can anybody help me?