enable multiline tooltips

svn path=/trunk/; revision=14362
This commit is contained in:
Martin Fuchs 2005-03-28 10:56:29 +00:00
parent 9b8f8ea446
commit f3fc2ca494
2 changed files with 9 additions and 3 deletions

View File

@ -286,6 +286,10 @@ int QuickLaunchBar::Notify(int id, NMHDR* pnmh)
#ifdef TTF_DI_SETITEM
ttdi->uFlags |= TTF_DI_SETITEM;
#endif
// enable multiline tooltips (break at CR/LF and for very long one-line strings)
SendMessage(pnmh->hwndFrom, TTM_SETMAXTIPWIDTH, 0, 400);
break;}
return super::Notify(id, pnmh);

View File

@ -555,13 +555,16 @@ int NotifyArea::Notify(int id, NMHDR* pnmh)
static ResString sShowIcons(IDS_SHOW_HIDDEN_ICONS);
static ResString sHideIcons(IDS_HIDE_ICONS);
pdi->lpszText = (LPTSTR)(_show_hidden?sHideIcons:sShowIcons).c_str();
pdi->lpszText = (LPTSTR)(_show_hidden? sHideIcons: sShowIcons).c_str();
} else {
NotifyIconSet::iterator found = IconHitTest(pt);
if (found != _sorted_icons.end()) {
NotifyInfo& entry = const_cast<NotifyInfo&>(*found); // Why does GCC 3.3 need this additional const_cast ?!
// enable multiline tooltips (break at CR/LF and for very long one-line strings)
SendMessage(pnmh->hwndFrom, TTM_SETMAXTIPWIDTH, 0, 400);
pdi->lpszText = (LPTSTR)entry._tipText.c_str();
}
}
@ -589,7 +592,7 @@ LRESULT NotifyArea::ProcessTrayNotification(int notify_code, NOTIFYICONDATA* pni
// a new entry?
if (entry._idx == -1)
entry._idx = ++_next_idx;
/*
/* equivalent code using iterator::find();
NotifyIconMap::iterator found = _icon_map.find(pnid);
NotifyInfo* pentry;
// a new entry?
@ -598,7 +601,6 @@ LRESULT NotifyArea::ProcessTrayNotification(int notify_code, NOTIFYICONDATA* pni
pentry->_idx = ++_next_idx;
} else {
pentry = &found->second;
*pentry = pnid;
}
NotifyInfo& entry = *pentry;
*/