From 4782b0e57f494c205e7fd49d7c7327aac6106734 Mon Sep 17 00:00:00 2001 From: "Guy L. Albertelli" Date: Fri, 26 Jan 2001 20:59:51 +0000 Subject: [PATCH] - When painting the text, if the control is OWNERDRAWN the issue the WM_DRAWITEM message. - Set the focused status at the end of the end of the Setfocus routine. - Flip the order of updating the list box and issuing the WM_NOTIFY for CBN_EDITUPDATE to match native. --- controls/combo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/controls/combo.c b/controls/combo.c index 120d3bcb2c1..abc5731f936 100644 --- a/controls/combo.c +++ b/controls/combo.c @@ -758,7 +758,8 @@ static void CBPaintText( } else return; } else - return; + if( !CB_OWNERDRAWN(lphc) ) + return; if( lphc->wState & CBF_EDIT ) { @@ -1284,6 +1285,7 @@ static void COMBO_SetFocus( LPHEADCOMBO lphc ) InvalidateRect(CB_HWND(lphc), &lphc->textRect, TRUE); CB_NOTIFY( lphc, CBN_SETFOCUS ); + lphc->wState |= CBF_FOCUSED; } } @@ -1355,9 +1357,6 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd ) * checks a flag that is set in these occasions and ignores the * notification. */ - if (!(lphc->wState & CBF_NOEDITNOTIFY)) - CB_NOTIFY( lphc, CBN_EDITCHANGE ); - if (lphc->wState & CBF_NOLBSELECT) { lphc->wState &= ~CBF_NOLBSELECT; @@ -1366,6 +1365,9 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd ) { CBUpdateLBox( lphc, lphc->wState & CBF_DROPPED ); } + + if (!(lphc->wState & CBF_NOEDITNOTIFY)) + CB_NOTIFY( lphc, CBN_EDITCHANGE ); break; case (EN_UPDATE >> 8):