Can anyone please give me a <b>working</b> example of EM_POSFROMCHAR??? When you use the SendMessage-function as described in the win32.hlp, you only get some strange errors!
Who is Participating?
jecksomConnect With a Mentor Commented:
Hi Metty!

From inprise's developer support :


Question and Answer Database

  FAQ1055D.txt   Avoiding an Application Error when using EM_POSFROMCHAR
  Category   :VCL
  Platform    :All
  Product    :Delphi 3.x  

  How can I avoid an Application Error when using the EM_POSFROMCHAR
  and EM_POSFROMCHAR in a RichEdit control?

  The definitions for EM_CHARFROMPOS and EM_POSFROMCHAR are different
  in the RichEdit and Messages units:

  RichEdit unit:
    EM_POSFROMCHAR         = WM_USER + 38;
    EM_CHARFROMPOS         = WM_USER + 39;

  Messages unit:
    EM_POSFROMCHAR         = 214;
    EM_CHARFROMPOS         = 215;

  To avoid confusion, these constants have been removed from the
  RichEdit unit in Delphi 3.

  When using the EM_POSFROMCHAR message, WParam should contain the
  address of the point structure that will receive the coordinates,
  and LParam should contain the zero based offset of the character. The
  return value is not initialized. Note that the y coordinate can be
  zero or negative.

  When using  EM_CHARFROMPOS, wparam is not used, and LParam should
  contain the address of the point structure that will receive the
  coordinates. The return value should contain the required character

  7/16/98 4:31:28 PM


Is that error that your asking for ?


MettyAuthor Commented:
Adjusted points to 100
what kind of errors do you get?
MettyAuthor Commented:
I'm running under Delphi3, Win95 and I'm getting an Access Violation in "RichEd32.DLL"

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.