News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

RichEdit quirks

Started by jj2007, September 17, 2008, 10:27:37 AM

Previous topic - Next topic

jj2007

Apart from the horrible confusion about versions, this just doesn't make sense to me: How can a cient area be described by a point??
Any clue??

The POINTL structure contains the coordinates of a point.

EM_POSFROMCHAR Message

Retrieves the client area coordinates of a specified character in an edit control. You can send this message to either an edit control or a rich edit control.

    wParam
        Rich Edit 1.0 and 3.0: A pointer to a POINTL structure that receives the client area coordinates of the character. The coordinates are in screen units and are relative to the upper-left corner of the control's client area.

        Edit controls and Rich Edit 2.0: The zero-based index of the character.
    lParam
        Rich Edit 1.0 and 3.0: The zero-based index of the character.

        Edit controls and Rich Edit 2.0: This parameter is not used.

Tedd

Just an English comprehension problem :wink

QuoteRetrieves the client area coordinates of a specified character in an edit control.

Translation:
Retrieves the coordinates of a specified character in an edit control; the position is within the client area and relative to its upper-left corner.
No snowflake in an avalanche feels responsible.

jj2007

Quote from: Tedd on September 18, 2008, 04:12:39 PM
Just an English comprehension problem :wink

QuoteRetrieves the client area coordinates of a specified character in an edit control.

Translation:
Retrieves the coordinates of a specified character in an edit control; the position is within the client area and relative to its upper-left corner.


Thanxalot, Tedd :U
In the meantime, I decided to avoid the version hell and turn the problem upside down:

EM_GETFIRSTVISIBLELINE: OK
EM_GETLASTVISIBLELINE: No such function, but with...
mov pt.y, client area height
EM_CHARFROMPOS, 0, addr pt
... there is a version-proof substitute.

jj2007

New trouble:
MSDN: Applications can handle the EN_LINK notification by changing the mouse pointer when it is over the URL.
Great. Works with WM_SETCURSOR or WM_MOUSEMOVE. So I can change the pointer to a hand. Unfortunately, I have not yet found a way to determine when the mouse pointer has left the link, so that I can change the pointer back to normal.

Can anybody help??