Skip to content

Commit b3cfe88

Browse files
gonzoMDlearn-more
authored andcommitted
[BROWSEUI] Show Tooltip text for 'Go' Button
-Patch by Barret Karish CORE-11058
1 parent c15c612 commit b3cfe88

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

dll/win32/browseui/addressband.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,17 @@ LRESULT CAddressBand::OnTipText(UINT idControl, NMHDR *notifyHeader, BOOL &bHand
415415
{
416416
if (notifyHeader->hwndFrom == fGoButton)
417417
{
418-
// TODO
419-
// Go to "destination path"
418+
WCHAR szText[MAX_PATH];
419+
WCHAR szFormat[MAX_PATH];
420+
LPNMTBGETINFOTIP pGIT = (LPNMTBGETINFOTIP)notifyHeader;
421+
422+
if (::GetWindowTextW(fEditControl, szText, _countof(szText)))
423+
{
424+
LoadStringW(_AtlBaseModule.GetResourceInstance(), IDS_GOBUTTONTIPTEMPLATE, szFormat, _countof(szFormat));
425+
wnsprintf(pGIT->pszText, pGIT->cchTextMax, szFormat, szText);
426+
}
427+
else
428+
*pGIT->pszText = 0;
420429
}
421430
return 0;
422431
}

dll/win32/browseui/addressband.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class CAddressBand :
109109

110110
BEGIN_MSG_MAP(CAddressBand)
111111
NOTIFY_CODE_HANDLER(NM_CLICK, OnNotifyClick)
112-
NOTIFY_CODE_HANDLER(TTN_NEEDTEXTW, OnTipText)
112+
NOTIFY_CODE_HANDLER(TBN_GETINFOTIP, OnTipText)
113113
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackground)
114114
MESSAGE_HANDLER(WM_SIZE, OnSize)
115115
MESSAGE_HANDLER(WM_WINDOWPOSCHANGING, OnWindowPosChanging)

0 commit comments

Comments
 (0)