From 1eea5d2dac2b96bb2f951d945394c01cc8b78379 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 28 Aug 2003 19:59:14 +0000 Subject: [PATCH] set TTN_ALWAYS for quicklaunch icons svn path=/trunk/; revision=5907 --- reactos/subsys/system/explorer/doc/TODO.txt | 2 +- reactos/subsys/system/explorer/taskbar/quicklaunch.cpp | 6 +++++- reactos/subsys/system/explorer/utility/utility.h | 2 ++ reactos/subsys/system/explorer/utility/window.cpp | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/reactos/subsys/system/explorer/doc/TODO.txt b/reactos/subsys/system/explorer/doc/TODO.txt index c41e7ad7d52..b97f885df32 100644 --- a/reactos/subsys/system/explorer/doc/TODO.txt +++ b/reactos/subsys/system/explorer/doc/TODO.txt @@ -9,7 +9,7 @@ - implement Drag Drop from the tree view. - activate accelerator keys like in shell view folders - program manager "progman" DDE server -- command line parameters like "/e,/root,c:\" and "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}" (launch auf control panel) +- command line parameters like "/e,/root,c:\" and "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}" (launch of control panel) - search functionality in start menu - Windows-key combos - Application Desktop Toolbars diff --git a/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp b/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp index eb9ada9c023..c1cad0d96fa 100644 --- a/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp +++ b/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp @@ -53,6 +53,10 @@ QuickLaunchBar::QuickLaunchBar(HWND hwnd) { _next_id = IDC_FIRST_QUICK_ID; + HWND hwndToolTip = (HWND) SendMessage(hwnd, TB_GETTOOLTIPS, 0, 0); + + SetWindowStyle(hwndToolTip, GetWindowStyle(hwndToolTip)|TTS_ALWAYSTIP); + // delay refresh to some tome later PostMessage(hwnd, PM_REFRESH, 0, 0); } @@ -158,7 +162,7 @@ int QuickLaunchBar::Command(int id, int code) int QuickLaunchBar::Notify(int id, NMHDR* pnmh) { switch(pnmh->code) { - case TTN_GETDISPINFO: { //TODO: TTN_GETDISPINFO is only received, if desktop bar window has the focus?! + case TTN_GETDISPINFO: { NMTTDISPINFO* ttdi = (NMTTDISPINFO*) pnmh; int id = ttdi->hdr.idFrom; diff --git a/reactos/subsys/system/explorer/utility/utility.h b/reactos/subsys/system/explorer/utility/utility.h index 6815091a52e..56088d679ac 100644 --- a/reactos/subsys/system/explorer/utility/utility.h +++ b/reactos/subsys/system/explorer/utility/utility.h @@ -390,6 +390,8 @@ extern "C" { #define SetDlgCtrlID(hwnd, id) SetWindowLong(hwnd, GWL_ID, id) +#define SetWindowStyle(hwnd, val) (DWORD)SetWindowLong(hwnd, GWL_STYLE, val) +#define SetWindowExStyle(h, val) (DWORD)SetWindowLong(hwnd, GWL_EXSTYLE, val) // display diff --git a/reactos/subsys/system/explorer/utility/window.cpp b/reactos/subsys/system/explorer/utility/window.cpp index 37a7491b324..4720bff4fb4 100644 --- a/reactos/subsys/system/explorer/utility/window.cpp +++ b/reactos/subsys/system/explorer/utility/window.cpp @@ -664,8 +664,8 @@ void PictureButton::DrawItem(LPDRAWITEMSTRUCT dis) ToolTip::ToolTip(HWND owner) - : super(CreateWindowEx(WS_EX_NOPARENTNOTIFY, TOOLTIPS_CLASS, 0, - TTS_ALWAYSTIP, CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT, + : super(CreateWindowEx(WS_EX_TOPMOST|WS_EX_NOPARENTNOTIFY, TOOLTIPS_CLASS, 0, + WS_POPUP|TTS_NOPREFIX|TTS_ALWAYSTIP, CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT, owner, 0, g_Globals._hInstance, 0)) { activate();