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
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.
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
>
> 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.
> 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
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;
--
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