enable multiline tooltips
Modified: trunk/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp
Modified: trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp
_____
Modified: trunk/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp
--- trunk/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp
2005-03-28 09:16:50 UTC (rev 14361)
+++ trunk/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp
2005-03-28 10:56:29 UTC (rev 14362)
@@ -286,6 +286,10 @@
#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);
_____
Modified: trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp
--- trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp
2005-03-28 09:16:50 UTC (rev 14361)
+++ trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp
2005-03-28 10:56:29 UTC (rev 14362)
@@ -555,13 +555,16 @@
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 @@
// 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 @@
pentry->_idx = ++_next_idx;
} else {
pentry = &found->second;
- *pentry = pnid;
}
NotifyInfo& entry = *pentry;
*/