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. C / C++ / MFC
  4. tooltips on edit controls

tooltips on edit controls

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
6 Posts 3 Posters 0 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.
  • B Offline
    B Offline
    big_denny_200
    wrote on last edited by
    #1

    hi all:) what is the easisest way to add tooltip support to my edit boxes in MFC application ? thank you.

    H 1 Reply Last reply
    0
    • B big_denny_200

      hi all:) what is the easisest way to add tooltip support to my edit boxes in MFC application ? thank you.

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      i use this way for button listbox and now edit and it work

      	m_tooltip.Create(this);
      	SetToolTip(_T("Hello"));
      void CAnswerView::SetToolTip(LPTSTR ToolTip)
      {
          TOOLINFO ti;
          ti.cbSize   = sizeof(TOOLINFO);
          ti.lpszText = ToolTip;
          ti.hinst    = AfxGetInstanceHandle();
          ti.hwnd     = m_Edit2.m_hWnd;
      		
      ti.uFlags   = TTF_SUBCLASS | TTF_IDISHWND;
      ti.uId      = (UINT) m_Edit2.m_hWnd;
       m_tooltip.SendMessage(TTM_ADDTOOL, 0, (LPARAM) &ti);
      }
      

      _**


      **_

      whitesky


      B 1 Reply Last reply
      0
      • H Hamid Taebi

        i use this way for button listbox and now edit and it work

        	m_tooltip.Create(this);
        	SetToolTip(_T("Hello"));
        void CAnswerView::SetToolTip(LPTSTR ToolTip)
        {
            TOOLINFO ti;
            ti.cbSize   = sizeof(TOOLINFO);
            ti.lpszText = ToolTip;
            ti.hinst    = AfxGetInstanceHandle();
            ti.hwnd     = m_Edit2.m_hWnd;
        		
        ti.uFlags   = TTF_SUBCLASS | TTF_IDISHWND;
        ti.uId      = (UINT) m_Edit2.m_hWnd;
         m_tooltip.SendMessage(TTM_ADDTOOL, 0, (LPARAM) &ti);
        }
        

        _**


        **_

        whitesky


        B Offline
        B Offline
        big_denny_200
        wrote on last edited by
        #3

        doesnt work :( I have VS2005

        H 1 Reply Last reply
        0
        • B big_denny_200

          doesnt work :( I have VS2005

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          i have vs2003 and it work so see CHoverButton - A simple hoverbutton with one bitmap and a tooltip[^] or Here[^]_**


          **_

          whitesky


          S 1 Reply Last reply
          0
          • H Hamid Taebi

            i have vs2003 and it work so see CHoverButton - A simple hoverbutton with one bitmap and a tooltip[^] or Here[^]_**


            **_

            whitesky


            S Offline
            S Offline
            Sarath C
            wrote on last edited by
            #5

            I have VS 2003 and VS 2005 installed. its working fine with both version of windows. SaRath
            "DM/b>****on't blindly follow rules you read somewhere without verifying that it makes sense for your situation!"

            H 1 Reply Last reply
            0
            • S Sarath C

              I have VS 2003 and VS 2005 installed. its working fine with both version of windows. SaRath
              "DM/b>****on't blindly follow rules you read somewhere without verifying that it makes sense for your situation!"

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              realy, I test my code in vs2005 for buttons and it work but i dont test this code for edit in vs2005_**


              **_

              whitesky


              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