我想把其它对象的hdc传递给vsprinter的hdc,让他可以打印,该如何实现

解决方案 »

  1.   

    vsprinter.RenderControl = frmSelect.DataGrid1.hwnd
      

  2.   

    我搞定了...
    哎。csdn高手是越来越少了
      

  3.   

    Private Declare Function StretchBlt Lib "gdi32.dll" ( _
         ByVal hdc As Long, _
         ByVal x As Long, _
         ByVal y As Long, _
         ByVal nWidth As Long, _
         ByVal nHeight As Long, _
         ByVal hSrcDC As Long, _
         ByVal xSrc As Long, _
         ByVal ySrc As Long, _
         ByVal nSrcWidth As Long, _
         ByVal nSrcHeight As Long, _
         ByVal dwRop As Long) As Long