On Mon, 25 Jan 2016 18:38:48 +0800, Dmitry Timoshkov wrote:
> Hugh McMaster wrote:
>
>> ---
>> dlls/user32/combo.c | 2 ++
>> dlls/user32/tests/combo.c | 4 ++--
>> 2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c
>> index c744ee5..4c57b72 100644
>> --- a/dlls/user32/combo.c
>> +++ b/dlls/user32/combo.c
>> @@ -1189,6 +1189,8 @@ static void COMBO_KillFocus( LPHEADCOMBO lphc )
>> {
>> if( CB_GETTYPE(lphc) == CBS_DROPDOWNLIST )
>> SendMessageW(lphc->hWndLBox, LB_CARETOFF, 0, 0);
>> + else
>> + SendMessageW(lphc->hWndEdit, EM_SETSEL, 0, 0);
>
> The message test doesn't confirm that this is a correct solution.
I tested the sequence from WM_KILLFOCUS twice in dlls/user32/tests/msg.c.
static const struct message SetFocusButtonSeq[] =
{
{ WM_KILLFOCUS, sent },
{ CB_GETCOMBOBOXINFO, sent|optional },/* Windows 2000 */
{ 0x0167, sent|optional },/* Undocumented message. Sent on all versions except Windows 2000 */
{ WM_LBUTTONUP, sent|defwinproc },
{ WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_COMBOBOX, CBN_SELENDCANCEL) },
{ EM_SETSEL, sent|defwinproc|wparam|lparam, 0, 0 },
{ WM_CTLCOLOREDIT, sent|defwinproc|optional },/* Not sent on W2000, XP or Server 2003 */
{ WM_CTLCOLOREDIT, sent|parent|optional },/* Not sent on W2000, XP or Server 2003 */
{ WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_COMBOBOX, CBN_KILLFOCUS) },
{ WM_CTLCOLORBTN, sent|parent },
{ 0 }
};
static const struct message SetFocusButtonSeq2[] =
{
{ WM_KILLFOCUS, sent },
{ CB_GETCOMBOBOXINFO, sent|optional },/* Windows 2000 */
{ 0x0167, sent|optional },/* Undocumented message. Sent on all versions except Windows 2000 */
{ WM_LBUTTONUP, sent|defwinproc },
{ WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_COMBOBOX, CBN_SELENDCANCEL) },
{ EM_SETSEL, sent|defwinproc|wparam|lparam, 0, 0 },
{ WM_CTLCOLOREDIT, sent|defwinproc },
{ WM_CTLCOLOREDIT, sent|parent },
{ WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_COMBOBOX, CBN_KILLFOCUS) },
{ WM_CTLCOLORBTN, sent|parent },
{ 0 }
};
In both sequences, the expected value of EM_SETSEL is 0, 0.
Perhaps I'm not understanding what you mean in this case.
--
Hugh McMaster