https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b3cfe88eda866440dbab9…
commit b3cfe88eda866440dbab98e56ef84862875ae6cc
Author: Robert Naumann <gonzomdx(a)gmail.com>
AuthorDate: Tue Aug 21 10:05:50 2018 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Tue Aug 21 12:49:04 2018 +0200
[BROWSEUI] Show Tooltip text for 'Go' Button
-Patch by Barret Karish CORE-11058
---
dll/win32/browseui/addressband.cpp | 13 +++++++++++--
dll/win32/browseui/addressband.h | 2 +-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dll/win32/browseui/addressband.cpp b/dll/win32/browseui/addressband.cpp
index 0bc3e971e2..54b0480c6a 100644
--- a/dll/win32/browseui/addressband.cpp
+++ b/dll/win32/browseui/addressband.cpp
@@ -415,8 +415,17 @@ LRESULT CAddressBand::OnTipText(UINT idControl, NMHDR *notifyHeader,
BOOL &bHand
{
if (notifyHeader->hwndFrom == fGoButton)
{
- // TODO
- // Go to "destination path"
+ WCHAR szText[MAX_PATH];
+ WCHAR szFormat[MAX_PATH];
+ LPNMTBGETINFOTIP pGIT = (LPNMTBGETINFOTIP)notifyHeader;
+
+ if (::GetWindowTextW(fEditControl, szText, _countof(szText)))
+ {
+ LoadStringW(_AtlBaseModule.GetResourceInstance(), IDS_GOBUTTONTIPTEMPLATE,
szFormat, _countof(szFormat));
+ wnsprintf(pGIT->pszText, pGIT->cchTextMax, szFormat, szText);
+ }
+ else
+ *pGIT->pszText = 0;
}
return 0;
}
diff --git a/dll/win32/browseui/addressband.h b/dll/win32/browseui/addressband.h
index eaba14282a..c4fd006ad6 100644
--- a/dll/win32/browseui/addressband.h
+++ b/dll/win32/browseui/addressband.h
@@ -109,7 +109,7 @@ public:
BEGIN_MSG_MAP(CAddressBand)
NOTIFY_CODE_HANDLER(NM_CLICK, OnNotifyClick)
- NOTIFY_CODE_HANDLER(TTN_NEEDTEXTW, OnTipText)
+ NOTIFY_CODE_HANDLER(TBN_GETINFOTIP, OnTipText)
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackground)
MESSAGE_HANDLER(WM_SIZE, OnSize)
MESSAGE_HANDLER(WM_WINDOWPOSCHANGING, OnWindowPosChanging)