GetPixel

機能
ピクセルのカラー値を取得する
Declare Function GetPixel Lib "gdi32.dll" _
(ByVal hdc As Long, ByVal nXPos As Long, ByVal nYPos As Long) As Long
Declare Function GetPixel Lib "gdi32.dll" _
(ByVal hdc As Integer, ByVal nXPos As Integer, ByVal nYPos As Integer) As Integer

COLORREF GetPixel(
HDC hdc,
int nXPos,
int nYPos
);

System.Drawing.Bitmap.GetPixel
引数
hdc

デバイスコンテキストのハンドル
nXPos
取得する位置のX座標
nYPos
同、Y座標
戻り値
正常終了のとき                   ピクセルのカラー値(長整数値)
エラーのとき                     CLR_INVALID(=&HFFFF&)
備考
Visual BasicのPoint関数と同じだが、4倍以上高速である