Reduce flicker with STC call tips in MSW

When switching between call tips in MSW, there can be a bit of flicker
when the first is closed and the new one is opened. To reduce the
flicker, store the call tip background in a bitmap and use a very brief
fade-in animation when showing the new call tip.
This commit is contained in:
New Pagodi
2019-03-10 22:10:09 -05:00
parent 0f7552cdb0
commit f0ba9f0ef1
2 changed files with 59 additions and 6 deletions

View File

@@ -2094,7 +2094,10 @@ PRectangle Window::GetMonitorRect(Point pt) {
if ( show )
{
HWND hWnd = reinterpret_cast<HWND>(GetHandle());
::ShowWindow(hWnd, SW_SHOWNA );
if ( GetName() == "wxSTCCallTip" )
::AnimateWindow(hWnd, 25, AW_BLEND);
else
::ShowWindow(hWnd, SW_SHOWNA );
::SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);