Solved

EM_POSFROMCHAR

Posted on 2000-03-02
2
780 Views
Last Modified: 2010-08-05
How do I use the EM_POSFROMCHAR API call?
0
Comment
Question by:smither030200
2 Comments
 

Accepted Solution

by:
Geo24 earned 200 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

776 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