[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Popup contextual help appears at mouse position
From: |
Greg Chicares |
Subject: |
Re: [lmi] Popup contextual help appears at mouse position |
Date: |
Fri, 29 Feb 2008 20:22:53 +0000 |
User-agent: |
Thunderbird 2.0.0.9 (Windows/20071031) |
On 2008-02-29 13:42Z, Vadim Zeitlin wrote:
> On Thu, 28 Feb 2008 19:04:17 +0000 Greg Chicares <address@hidden> wrote:
[...displaying help "tips" near selected control vs. at mouse
position...]
Somehow this intrigues me, so let me ask a question or two,
acknowledging that this is outside my field of expertise.
> I agree and so I propose to fix this in the following way: if the mouse is
> inside the control when Shift+F1 is pressed, show help at its position.
At first, I was wondering why you'd distinguish that special
case instead of using the "near" method (below) unconditionally.
My guess is that you're thinking of a large text control, like
the main screen of a text editor, where a "tip" might otherwise
pop up far from the user's visual focus. That sounds like a
good enough reason to me; I just wonder whether there's another
rationale as well.
> Otherwise, show help "near" the control: by default, position it just under
> it but place it above instead if it wouldn't fit on screen otherwise (this
> is a bit tricky as I don't know right now how to get the size of the
> tooltip window).
'src/msw/tooltip.cpp' calls GetTextExtentPoint32() already, to
get the maximum width, so the height is available, too. Doesn't
TTM_ADJUSTRECT then give you the window size? Or, if you want to
avoid depending on a modern version of comctl32.dll, wouldn't it
suffice to add, say, ten pixels to both dimensions? (That's what
our legacy app, with its ancient GUI library, seems to do.)