Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 838
  • Last Modified:

EM_POSFROMCHAR

How do I use the EM_POSFROMCHAR API call?
0
smither030200
Asked:
smither030200
1 Solution
 
Geo24Commented:
This API call is documented wrong on several places...

Do this_
'API DECLARATIONS AT THE TOP

Private Type POINTAPI
    X As Long
    Y As Long
End Type

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, wParam As Any, lParam As Any) As Long

Private Const EM_POSFROMCHAR = &HD6



  Dim P As POINTAPI
SendMessage Editorwindow.HtmlWindow.hwnd, EM_POSFROMCHAR, P, ByVal 12
ConvToTwipsX = P.X * Screen.TwipsPerPixelX
ConvToTwipsY = P.Y * Screen.TwipsPerPixelY



Now you have the x and y coordinates of char 12 in ConvToTwipsX and ConvToTwipsY

Take it easy
0
 
smither030200Author Commented:
It was really this easy... then it wasnt me┬┤who was stupid:) thanx!!!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now