Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/edit.c | 2 -- include/commctrl.h | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index aeba9f73e7..249e08b3a1 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -23,9 +23,7 @@ * * TODO: * - EDITBALLOONTIP structure - * - EM_GETCUEBANNER/Edit_GetCueBannerText * - EM_HIDEBALLOONTIP/Edit_HideBalloonTip - * - EM_SETCUEBANNER/Edit_SetCueBannerText * - EM_SHOWBALLOONTIP/Edit_ShowBalloonTip * - EM_GETIMESTATUS, EM_SETIMESTATUS * - EN_ALIGN_LTR_EC diff --git a/include/commctrl.h b/include/commctrl.h index 77f460a99d..aed91809d6 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -5259,6 +5259,13 @@ typedef struct _tagEDITBALLOONTIP #define EM_NOSETFOCUS (ECM_FIRST + 7) #define EM_TAKEFOCUS (ECM_FIRST + 8)
+#define Edit_SetCueBannerText(hwnd, text) \ + (BOOL)SNDMSG((hwnd), EM_SETCUEBANNER, 0, (LPARAM)(text)) +#define Edit_SetCueBannerTextFocused(hwnd, text, drawfocused) \ + (BOOL)SNDMSG((hwnd), EM_SETCUEBANNER, (WPARAM)drawfocused, (LPARAM)text) +#define Edit_GetCueBannerText(hwnd, buff, buff_size) \ + (BOOL)SNDMSG((hwnd), EM_GETCUEBANNER, (WPARAM)(buff), (LPARAM)(buff_size)) + /************************************************************************** * Listbox control */
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/edit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index 249e08b3a1..06e1f498dc 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -129,7 +129,9 @@ typedef struct should be sent to the first parent. */ HWND hwndListBox; /* handle of ComboBox's listbox or NULL */ INT wheelDeltaRemainder; /* scroll wheel delta left over after scrolling whole lines */ - WCHAR *cue_banner_text; + WCHAR *cue_banner_text; + BOOL cue_banner_draw_focused; + /* * only for multi line controls */ @@ -2181,7 +2183,7 @@ static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev) } else x += EDIT_PaintText(es, dc, x, y, line, 0, ll, FALSE);
- if (es->cue_banner_text && es->text_length == 0 && !(es->flags & EF_FOCUSED)) + if (es->cue_banner_text && es->text_length == 0 && (!(es->flags & EF_FOCUSED) || es->cue_banner_draw_focused)) { SetTextColor(dc, GetSysColor(COLOR_GRAYTEXT)); TextOutW(dc, x, y, es->cue_banner_text, strlenW(es->cue_banner_text)); @@ -4170,16 +4172,14 @@ static inline WCHAR *heap_strdupW(const WCHAR *str) * EM_SETCUEBANNER * */ -static BOOL EDIT_EM_SetCueBanner(EDITSTATE *es, BOOL focus, const WCHAR *cue_text) +static BOOL EDIT_EM_SetCueBanner(EDITSTATE *es, BOOL draw_focused, const WCHAR *cue_text) { if (es->style & ES_MULTILINE || !cue_text) return FALSE;
- if (focus) - FIXME("cue banner for focused control not implemented.\n"); - heap_free(es->cue_banner_text); es->cue_banner_text = heap_strdupW(cue_text); + es->cue_banner_draw_focused = draw_focused;
return TRUE; }