如何使用选择更改事件触发设置组合框的索引

时间:2018-12-05 10:19:51

标签: c# wpf sendmessage settext postmessage

                int f_index = 2;//select index 2 on combobox.

                int l_ComBoxHandle = f_automationElement.Current.NativeWindowHandle;

                SendMessage((IntPtr)l_ComBoxHandle, CommonDef.WM_LBUTTONDOWN, f_index, 0);
                SendMessage((IntPtr)l_ComBoxHandle, CommonDef.WM_LBUTTONUP, f_index, 0);

                int l_result = SendMessage((IntPtr)l_ComBoxHandle, CommonDef.CB_SETCURSEL, f_index, 0);

                SendMessage((IntPtr)l_ComBoxHandle, CommonDef.WM_LBUTTONDOWN, f_index, 0);
                SendMessage((IntPtr)l_ComBoxHandle, CommonDef.WM_LBUTTONUP, f_index, 0);

如何使用C ++通过选择更改事件触发来设置组合框的索引

0 个答案:

没有答案