Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. Transparent tooltip gets focus with the manifest-style under Windows XP

Transparent tooltip gets focus with the manifest-style under Windows XP

Scheduled Pinned Locked Moved Windows Forms
helpc++databasecomtutorial
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ASCODATA
    wrote on last edited by
    #1

    A Tooltip with TTF_TRANSPARENT and TTF_TRACK tool gets the focus, if I used under Windows XP the manifest-style and click with the mouse on the tooltip. But I want, that the tooltip dispaths the messages to the window, that is under the tooltip. I have searched in the world wide web about this problem, but did not found other persons with the same problem. I have tested other example-applications from www.codeproject.com, with a litle modification (the tooltip was only shown, but not hidden) and the tested applications have the same problem. I don't know, how Microsoft use in the VC6.0 in the Workarea-Window also an tooltip-window, because they haven't the same problem. The following source-code is from my test-application. The program is a simple MFC-dialog-program, the dialog includes an OK- and Cancel-button. m_wndToolTip is from CToolTipCtrl. void CTooltiptestDlg::OnOK() { TOOLINFO TI; char caText[1024]; static long nIndex = 0; CRect rectTemp; CFont* pfont; CWnd* pwndOK; memset(&TI, 0, sizeof(TI)); TI.cbSize = sizeof(TI); sprintf(caText, "nIndex=%d", nIndex); TI.lpszText = caText; if(IsWindow(m_wndToolTip) == FALSE) { m_wndToolTip.Create(this, TTS_ALWAYSTIP | TTS_NOPREFIX); m_wndToolTip.SetMaxTipWidth(SHRT_MAX); //Add tool TI.uFlags = TTF_TRACK | TTF_TRANSPARENT; m_wndToolTip.SendMessage(TTM_ADDTOOL, 0, (LPARAM)&TI); } else { //Modify the text of the tooltip. m_wndToolTip.SendMessage(TTM_UPDATETIPTEXT, 0, (LPARAM)&TI); } //Take over the font from the dialog. pfont = GetFont(); if(pfont != NULL) { m_wndToolTip.SetFont(pfont); } //Set the position of the tooltip. pwndOK = GetDlgItem(IDOK); pwndOK->GetWindowRect(&rectTemp); m_wndToolTip.SendMessage(TTM_TRACKPOSITION, 0, (LPARAM)MAKELONG(rectTemp.left, rectTemp.top)); //Show tooltip memset(&TI, 0, sizeof(TI)); TI.cbSize = sizeof(TI); m_wndToolTip.SendMessage(TTM_TRACKACTIVATE, TRUE, (LPARAM)&TI); //Increment the static index nIndex++; } I haven't called the CToolTipCtrl::RelayEvent-function in CWnd::PreTranslateMessage, because the tool is added with TTF_TRANSPARENT and TTF_TRACK, position with TTM_TRACKPOSITION and showed with TTM_TRACKACTIVATE. Can anybody help me??? Johannes Ody

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups