Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MLE and mouse pointer question

1 view
Skip to first unread message

Peter Kumpf

unread,
Dec 17, 2009, 9:06:45 AM12/17/09
to
Hello/2.

I it possible (and if yes, how) to prevent that the mouse pointer (mouse
postion in MLE) is switched into a "hidden" state, if text is added
(via keyboard) into the MLE ?

Kind regards, Peter

Lars Erdmann

unread,
Dec 17, 2009, 7:20:53 PM12/17/09
to
Peter Kumpf schrieb:
I cannot observe what you are saying. If I enter something via keyboard
into an MLE, the mouse position is still visible as a vertical bar and
is always at the end of the entered text.

Lars

J de Boyne Pollard

unread,
Dec 17, 2009, 9:58:27 PM12/17/09
to
PK> I it possible (and if yes, how) to prevent that the mouse
PK> pointer (mouse postion in MLE) is switched into a
PK> "hidden" state, if text is added (via keyboard) into the
PK> MLE ?

LE> I cannot observe what you are saying. If I enter something
LE> via keyboard into an MLE, the mouse position is still
LE> visible as a vertical bar and is always at the end of the
LE> entered text.

No, that's the *cursor* that is always at the text insertion point.
M. Kumpf is talking about the *pointer*. Pointers and cursors are two
different things.

Peter Kumpf

unread,
Dec 18, 2009, 3:02:25 AM12/18/09
to
Hello Lars.

Yes, right. BUT i didn't wrote about the cursor (vertical bar) at the

end of the entered text.

I wrote MOUSE POINTER. And the mouse pointer disappears if the first
character was entered.
And i try to find out a solution to keep the mouse pointer "visible".

Kind regards, Peter

Peter Kumpf

unread,
Dec 18, 2009, 3:03:43 AM12/18/09
to

J de Boyne Pollard wrote:

>
> No, that's the *cursor* that is always at the text insertion point.
> M. Kumpf is talking about the *pointer*. Pointers and cursors are two
> different things.

Right. That's what i'm talking about.
Thanks.

Ruediger Ihle

unread,
Dec 18, 2009, 5:22:50 AM12/18/09
to
On Fri, 18 Dec 2009 08:02:25 UTC, Peter Kumpf <PaleKu...@t-online.de> wrote:


> And i try to find out a solution to keep the mouse pointer "visible".

I would be interested in why you need that so desperately...

However you can subclass your MLE and use the following window procedure:

MRESULT EXPENTRY MleWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
{
MRESULT result;
POINTL ptlMouse;

switch( msg )
{
case WM_CHAR :
result = (*pfnOldWndProc)(hwnd, msg, mp1, mp2);

if( WinQueryPointerPos(HWND_DESKTOP, &ptlMouse) )
{
WinMapWindowPoints(HWND_DESKTOP, hwnd, &ptlMouse, 1);

(*pfnOldWndProc)(hwnd, WM_MOUSEMOVE,
MPFROM2SHORT((SHORT)ptlMouse.x, (SHORT)ptlMouse.y),
MPFROM2SHORT(HT_NORMAL, KC_NONE));

}

return result;
}

return (*pfnOldWndProc)(hwnd, msg, mp1, mp2);
}

--
Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
http://www.s-t.de
Please remove all characters left of the "R" in my email address

Ruediger Ihle

unread,
Dec 18, 2009, 6:06:48 AM12/18/09
to
On Fri, 18 Dec 2009 10:22:50 UTC, "Ruediger Ihle" <NOSPAM...@S-t.De> wrote:


Opps, forgot something: It might be a good idea add an additional
check that the mouse pointer is really above out MLE...


case WM_CHAR :
result = (*pfnOldWndProc)(hwnd, msg, mp1, mp2);

if( WinQueryPointerPos(HWND_DESKTOP, &ptlMouse) &&
WinWindowFromPoint(HWND_DESKTOP, &ptlMouse, TRUE) == hwnd )
{
WinMapWindowPoints(HWND_DESKTOP, hwnd, &ptlMouse, 1);

(*pfnOldWndProc)(hwnd, WM_MOUSEMOVE,
MPFROM2SHORT((SHORT)ptlMouse.x, (SHORT)ptlMouse.y),
MPFROM2SHORT(HT_NORMAL, KC_NONE));
}

return result;

--

Peter Kumpf

unread,
Dec 20, 2009, 7:07:05 AM12/20/09
to
Hello Ruediger.

Thanks. That's a good idea.
Didn't thought about a WM_MOUSEMOVE message within the WM_CHAR message.

Ruediger Ihle wrote:
>
> Opps, forgot something: It might be a good idea add an additional
> check that the mouse pointer is really above out MLE...
>
> case WM_CHAR :
> result = (*pfnOldWndProc)(hwnd, msg, mp1, mp2);
>
> if( WinQueryPointerPos(HWND_DESKTOP, &ptlMouse) &&
> WinWindowFromPoint(HWND_DESKTOP, &ptlMouse, TRUE) == hwnd )
> {
> WinMapWindowPoints(HWND_DESKTOP, hwnd, &ptlMouse, 1);
>
> (*pfnOldWndProc)(hwnd, WM_MOUSEMOVE,
> MPFROM2SHORT((SHORT)ptlMouse.x, (SHORT)ptlMouse.y),
> MPFROM2SHORT(HT_NORMAL, KC_NONE));
> }
>
> return result;
>

Yesterday evening i found 'WinShowPointer' and after thinking how to
determine the current 'hide level' i found 'WinQuerySysValue'. So i
tried these two AIP calls. Later i had the same idea and added a mouse
pointer position check.

I will try your solution, could be the faster one.

To your question why i needed it:
one thing i add to the MLE was a popup menu and for that feature i found
it very annoying not to know where the mouse pointer is.

Again, thanks for your solution/idea.

Regards, Peter

0 new messages