[DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int msg, string wParam, string lParam);
Private void GetSlecteITemIdex()
{
int _ComBoxHandle = System.Windows.Automation.AutomationElement.Current.NativeWindowHandle;
int l_GETSelectedItem1 = SendMessage((IntPtr)l_ComBoxHandle, CB_SELECTSTRING, null, "英語");
if (l_GETSelectedItem1 == -1)
throw new Exception("Item not found.");
}
I want to get index of japanese item "英語" from combobox but its always giving index "-1" using above code same for english items its giving me correct index what additionally need to do get Japanese item index correctly.
