Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HWND CreateToolTip(int toolID, HWND window, PTSTR pszText)
- {
- // Create the tooltip. g_hInst is the global instance handle.
- HWND hwndTip = CreateWindowEx(NULL, TOOLTIPS_CLASS, NULL,
- WS_POPUP |TTS_ALWAYSTIP | TTS_BALLOON,
- CW_USEDEFAULT, CW_USEDEFAULT,
- CW_USEDEFAULT, CW_USEDEFAULT,
- hDlg, NULL,
- g_hInst, NULL);
- if (!hwndTip)
- {
- return (HWND)NULL;
- }
- // Associate the tooltip with the tool.
- TOOLINFO toolInfo = { 0 };
- toolInfo.cbSize = sizeof(toolInfo);
- toolInfo.hwnd = hDlg;
- toolInfo.uFlags = TTF_IDISHWND | TTF_SUBCLASS;
- toolInfo.uId = (UINT_PTR)hwndTool;
- toolInfo.lpszText = pszText;
- SendMessage(hwndTip, TTM_ADDTOOL, 0, (LPARAM)&toolInfo);
- return hwndTip;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement