gdi 载入图片 到hdc
gdi 中,怎么把图片载入到hdc 中?
网上找的现在都是gdi+ 的。
我是这样写的,但hdc里没东西啊
Public Function GdiLoadPicture(ByVal hdc As Long, ByVal FileName As String, Optional bWidth As Long = 0, Optional bHeight As Long = 0) As Long DeleteDC hdc hdc = CreateCompatibleDC(0) Dim bmp As Long Dim bw As Long, bh As Long bmp = LoadImage(0, FileName, IMAGE_BITMAP, bw, bh, LR_LOADFROMFILE) SelectObject hdc, bmp End Function