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. Help with Tracking Tooltips

Help with Tracking Tooltips

Scheduled Pinned Locked Moved C / C++ / MFC
helpvisual-studio
1 Posts 1 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.
  • P Offline
    P Offline
    Paddy
    wrote on last edited by
    #1

    Hi, Hope someone can help me out here. I'm trying to add a tracking tooltip to my app, so I got the required code from the vS help files and then added it to my code. So basically I have: HWND WINAPI CreateTT(HWND hwndOwner) { // Code for creating tool tip } in my wndproc I added case WM_MOUSEMOVE: if(g_bIsVisible){ #define X_OFFSET 15 #define Y_OFFSET X_OFFSET GetCursorPos(&point); SendMessage(g_hwndTT, TTM_TRACKPOSITION, 0, (LPARAM)MAKELPARAM(point.x + X_OFFSET, point.y + Y_OFFSET)); } return 0; I then added to my CASE WM_CREATE: g_hwndTT = CreateTT(hwnd); When I compile my app I get a "Run-Time Check Failure #3 - The variable 'g_hwndTT' is being used without being defined." whenever I move the mouse. I don't understand why I get this error when I'm defining g_hwndTT using g_hwndTT = CreateTT(hwnd); I'm sure it is something simple I'm missing. Any help appreciated, Thanks in advance, Paddy.

    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