break;
case WM_SIZE:
+ // wxStaticBox can generate this message, when modifying the control's style.
+ // This causes the content of the combobox to be selected, for some reason.
+ case WM_STYLECHANGED:
{
// combobox selection sometimes spontaneously changes when its
// size changes, restore it to the old value if necessary
{
if (!IsEditable())
return false;
-
+
HWND hEditWnd = (HWND) GetEditHWND() ;
if ( hEditWnd )
return ::SendMessage(hEditWnd, EM_CANUNDO, 0, 0) != 0;
{
if (!IsEditable())
return false;
-
+
HWND hEditWnd = (HWND) GetEditHWND() ;
if ( hEditWnd )
return ::SendMessage(hEditWnd, EM_CANUNDO, 0, 0) != 0;
long wxComboBox::GetInsertionPoint() const
{
- // CB_GETEDITSEL returns the index of the last character after selection in
- // its high-order word
+ // CB_GETEDITSEL returns the index of the first character of the selection in
+ // its low-order word
DWORD pos= (DWORD)::SendMessage(GetHwnd(), CB_GETEDITSEL, 0, 0L);
-
- return HIWORD(pos);
+ return LOWORD(pos);
}
wxTextPos wxComboBox::GetLastPosition() const
// Paste into edit control
SendMessage(GetHwnd(), WM_PASTE, (WPARAM)0, (LPARAM)0L);
+#else
+ wxUnusedVar(from);
+ wxUnusedVar(to);
+ wxUnusedVar(value);
#endif
}