Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

EM_POSFROMCHAR

Posted on 2000-03-02
2
Medium Priority
?
811 Views
Last Modified: 2010-08-05
How do I use the EM_POSFROMCHAR API call?
0
Comment
Question by:smither030200
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
Geo24 earned 600 total points
ID: 2577791
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
 

Author Comment

by:smither030200
ID: 2577801
It was really this easy... then it wasnt me´who was stupid:) thanx!!!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question