[BROWSEUI] Show Tooltip text for 'Go' Button

-Patch by Barret Karish CORE-11058
This commit is contained in:
Robert Naumann 2018-08-21 10:05:50 +02:00 committed by Mark Jansen
parent c15c61275c
commit b3cfe88eda
2 changed files with 12 additions and 3 deletions

View file

@ -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;
}

View file

@ -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)