From 140ed85ed7a2cd3f8fb9429f419dfc9812b2b4b1 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 10 Oct 2010 16:58:55 +0000 Subject: [PATCH] Added ToolTipHidden=1 / 0. When set to 1, tooltips will be suppressed. Default is 0. Some minor changes to Rainstaller. --- Library/Meter.cpp | 10 +++++++++- Library/Meter.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Library/Meter.cpp b/Library/Meter.cpp index 9447a80e..11747d21 100644 --- a/Library/Meter.cpp +++ b/Library/Meter.cpp @@ -365,6 +365,7 @@ void CMeter::ReadConfig(const WCHAR* section) m_ToolTipIcon = parser.ReadString(section, L"ToolTipIcon", L"", true); m_ToolTipWidth = (int)parser.ReadFormula(section, L"ToolTipWidth", 1000); m_ToolTipType = 0!=parser.ReadInt(section, L"ToolTipType", 0); + m_ToolTipHidden = 0!=parser.ReadInt(section, L"ToolTipHidden", 0); m_MeasureName = parser.ReadString(section, L"MeasureName", L""); @@ -678,7 +679,14 @@ void CMeter::UpdateToolTip() DestroyIcon(hIcon); } } - SendMessage(hwndTT, TTM_ACTIVATE, !IsHidden(), NULL); + if (m_ToolTipHidden) + { + SendMessage(hwndTT, TTM_ACTIVATE, false, NULL); + } + else + { + SendMessage(hwndTT, TTM_ACTIVATE, !IsHidden(), NULL); + } } /* diff --git a/Library/Meter.h b/Library/Meter.h index 77ff3669..dbdd785a 100644 --- a/Library/Meter.h +++ b/Library/Meter.h @@ -132,6 +132,7 @@ protected: std::wstring m_ToolTipIcon; unsigned int m_ToolTipWidth; bool m_ToolTipType; + bool m_ToolTipHidden; HWND m_ToolTipHandle;