如何根据hdc获取图象数据??最好得到的是 Byte 数组`

解决方案 »

  1.   

    http://blog.csdn.net/WallesCai/archive/2004/12/31/235270.aspxhttp://topic.csdn.net/u/20071119/22/432910b3-1e70-42c7-851e-f389cc1b40b1.htmlhttp://topic.csdn.net/u/20071203/23/7daf9fb1-c39b-463d-9e12-87e0a53f2e08.html我已经在这些帖子中回复,楼主自己看一下
      

  2.   

    看看我的directx飞机源代码或许可以给你启发
      

  3.   

    Private Declare Function GetDesktopWindow Lib "user32" () As Long
    Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
    Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC 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 dwRop As Long) As LongPrivate Sub Form_Load()
       Dim lDesktop&, hDC&
       Me.AutoRedraw = True
       Me.ScaleMode = 1
       lDesktop = GetDesktopWindow() '取得桌面窗口
       hDC = GetDC(lDesktop) '取得桌面窗口的设备场景
       BitBlt Me.hDC, 0, 0, Screen.Width, Screen.Height, hDC, 0, 0, vbSrcCopy '将桌面图象绘制到窗体
    End Sub