@@ -520,6 +520,34 @@ HRESULT CVRMainPPage::OnApplyChanges()
520520 return S_OK;
521521}
522522
523+ HWND CVRMainPPage::CreateHintWindow (HWND parent, int timePop, int timeInit, int timeReshow)
524+ {
525+ HWND hhint = CreateWindowExW (WS_EX_TOPMOST, TOOLTIPS_CLASS, nullptr ,
526+ WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT,
527+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, parent, nullptr , nullptr , nullptr );
528+
529+ SetWindowPos (hhint, 0 , 0 , 0 , 0 , SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
530+ SendMessageW (hhint, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELONG (timePop, 0 ));
531+ SendMessageW (hhint, TTM_SETDELAYTIME, TTDT_INITIAL, MAKELONG (timeInit, 0 ));
532+ SendMessageW (hhint, TTM_SETDELAYTIME, TTDT_RESHOW, MAKELONG (timeReshow, 0 ));
533+ SendMessageW (hhint, TTM_SETMAXTIPWIDTH, 0 , 470 );
534+ return hhint;
535+ }
536+
537+ void CVRMainPPage::AddHint (int id, const LPCWSTR text)
538+ {
539+ if (!m_hHint) {
540+ m_hHint = CreateHintWindow (m_Dlg, 15000 );
541+ }
542+ TOOLINFOW ti;
543+ ti.cbSize = sizeof (TOOLINFOW);
544+ ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND;
545+ ti.hwnd = m_Dlg;
546+ ti.uId = (LPARAM)GetDlgItem (id).m_hWnd ;
547+ ti.lpszText = const_cast <LPWSTR>(text);
548+ SendMessageW (m_hHint, TTM_ADDTOOLW, 0 , (LPARAM)&ti);
549+ }
550+
523551// CVRInfoPPage
524552
525553CVRInfoPPage::CVRInfoPPage (LPUNKNOWN lpunk, HRESULT* phr) :
0 commit comments