vb 怎么获取控件的hdc(不用hdc属性),急!!!

来源:百度知道 编辑:UC知道 时间:2024/06/17 22:57:22
vb 怎么获取控件的hdc(不用hdc属性)因为static没有
靠!!!!!!!!!!!
hDC原来就是DC

Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long

Private Sub Command1_Click()
Print GetDC(Picture1.hwnd)
Print Picture1.hDC
Print GetDC(Command1.hwnd)
End Sub

gethdc

有一个API函数能通过窗体hWnd获取hDC