MSW: Fix for wxComboBox::SetEditable

Nusret Taşçı nusi at sofha.de
Sat Sep 9 06:51:36 PDT 2006


I'm not sure whether this is the right way to propose a small patch like 
this. I tried to propose another patch with SourceForge, but it looks 
like everyone is very busy and is afraid of looking at proposed patches.
However...
Currently wxComboBox::SetEditable() isn't implemented for MSW.
I propose following patch.


RCS file: /pack/cvsroots/wxwidgets/wxWidgets/src/msw/combobox.cpp,v
retrieving revision 1.129
diff -r1.129 combobox.cpp
597,599c597,603
<   // Can't implement in MSW?
< //  HWND hWnd = GetHwnd();
< //  SendMessage(hWnd, EM_SETREADONLY, (WPARAM)!editable, (LPARAM)0L);
---
 >     if (!IsEditable())
 >         return;
 >     COMBOBOXINFO ci = {0};
 >     ci.cbSize = sizeof(ci);
 >     if (GetComboBoxInfo((HWND)GetHWND(), &ci))
 >         if (IsWindow(ci.hwndItem))
 >             SendMessage(ci.hwndItem, EM_SETREADONLY, 
(WPARAM)!editable, (LPARAM)0L);





More information about the wx-dev mailing list