|
Description
|
Returns the Windows hDC associated with the control.
|
Syntax Visual Basic
|
Value& = [form.]DXFReader.hDC
|
|
Visual C++
|
long DXFReader.GethDC(); void DXFReader.SethDC(long nNewValue);
|
|
Delphi
|
property hDC: Integer;
|
|
C#
|
int DXFReader.hDC;
|
|
Remarks
|
This property is useful if you wish to call Windows API functions to draw in the control.
The code below will add an icon to the drawing using the DrawIcon API function:
Private Sub DXFReader1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
With DXFReader1
If Shift = 1 Then
DrawIcon .hDC, .CoordXtoPixel(X), .CoordYtoPixel(Y),LoadPicture(App.Path + "\stop.ico").Handle
End If
End With
End Sub
See the CoordXtoPixel, CoordYtoPixel, PixelXtoCoord, and PixelYtoCoord methods for more information.
|
|
Data Type
|
Long
|