DPtoLP

機能
点座標をデバイス座標から論理座標に変換する
Declare Function DPtoLP lib "gdi32.dll" _
(ByVal hdc As Long, lpPoints As Any, ByVal nCount As Long) As Long
Declare Function DPtoLP lib "gdi32.dll" _
(ByVal hdc As Integer, lpPoints As Integer, ByVal nCount As Integer) As Integer

BOOL DPtoLP(
HDC hdc,
LPPOINT lpPoints,
int nCount
);
引数
hdc

デバイスコンテキストのハンドル
lpPoints
(戻り値)点座標を格納するPOINTAPI構造体
nCount
同、配列の要素数
戻り値
正常終了のとき                                     0以外
エラーのとき                                       0
備考
lpPointsに変換前の座標を格納して、この関数を実行すると座標値が変換される。
変換は、デバイスコンテキストのマッピングモード、座標原点などに基づいて行われる。