Solved

EM_POSFROMCHAR

Posted on 2000-03-02
2
789 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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 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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

828 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