Announcement

Collapse
No announcement yet.

"GetCursorSize"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Semen Matusovski
    replied
    I looked codeguru, but found more or less interesting code on another (also nice) site http://www.codeproject.com/miscctrl/tooltipex.asp
    Here is used fixed offset (0, 20)

    ------------------

    Leave a comment:


  • Lance Edmonds
    replied
    What about being consistent on differing resolutions? Also, the normal TT control has a (horizontally) centering flag, and there are also screen edge considerations on positioning.

    Hardcoding values is never a good idea.

    A better way would be to "reverse engineer" the real tooltips setting - if you look through WIN32.HLP, you'll find an ENUM function so you can query a tooltip that is being displayed. Compare that to the cursor position and size on a few differenrt resolutions, and you should be able to work it out.

    Unless someone has some inside knowledge of how TT's are positioned... that would be useful... a search at somewhere like www.codeguru.com may be worthwhile.

    Good luck! It sounds like an interesting project! I always thought about doing that sort of thing myself, so I could use non-standard tip windows, such as "bubble help" and roundrect windows, etc.



    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Semen,
    I simply added a few pixels..
    x = 12
    y = 20


    ------------------

    Leave a comment:


  • Eric Pearson
    replied
    I have no idea. You'll probably have to experiment with it (on various versions of Windows, using a variety of cursors like arrows, hands, and crosses) to find out.

    Unless somebody else knows...

    -- Eric

    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]ync.com</A>



    [This message has been edited by Eric Pearson (edited June 12, 2000).]

    Leave a comment:


  • Semen Matusovski
    replied
    Eric --
    I created "own-drawn" tooltips for "own-drawn" elements and want to imitate Windows rules of their appearence.
    It looks that pt.x for tooltip is the same as GetCursorPos, pt.y = pt.y of cursor + cursor height.
    Or I am wrong (this offset is simply constant) ?


    ------------------


    [This message has been edited by Semen Matusovski (edited June 12, 2000).]

    Leave a comment:


  • Eric Pearson
    replied
    Semen --

    You'll need to use the GetIconInfo API. A cursor is simply a special kind of icon, and several icon-related functions can be used with cursors. Note that the ICONINFO structure contains "hot spot" information, and most icons don't have hot spots.

    That points out another pitfall... the "cursor location" does not always correspond to the top-left corner of the cursor's rectangle, so the math gets somewhat more complicated.

    -- Eric

    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>

    Leave a comment:


  • Semen Matusovski
    started a topic "GetCursorSize"

    "GetCursorSize"

    Folks --
    GetCursorPos returns top, left coordinates.
    But how to receive right, bottom coordinates ? (system cursor)
Working...
X