Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

MFC Multi-line Tracking Tooltip

$
0
0

hi,

How to implement a multi-line Tooltip with different fonts. For example, first line is bigger font and bold.

if (message == WM_NOTIFY)
    {
        switch (((LPNMHDR)lParam)->code)
        {
            case TTN_GETDISPINFO:
            LPNMTTDISPINFO pInfo = (LPNMTTDISPINFO)lParam;
            ::SendMessage(pInfo->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, 0, 150);
            wcscpy_s(pInfo->szText, ARRAYSIZE(pInfo->szText), 
                L"This\nis a very long text string " \
                L"that must be broken into several lines.");
            break;
        }
    }

So, word "This" in this case is bold and bigger font.

thanks


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>