解决方案 »

  1.   

    窗口截图
    http://blog.163.com/tijijun@126/blog/static/68209745201441611472209/
      

  2.   


    请问这能对OpenGL窗口截图吗?
      

  3.   


    请问这能对OpenGL窗口截图吗?
      

  4.   

    仅供参考,尽管是VB6:Option Explicit
    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 Long
    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)Private Sub Form_Load()
      Me.AutoRedraw = False
      Me.BorderStyle = 0
      Me.Caption = ""
      Picture1.AutoRedraw = True
      Picture1.AutoSize = True
      Picture1.BorderStyle = 0
      Picture1.Move Screen.Width
      Picture2.BorderStyle = 0
      Picture2.Width = ShockwaveFlash1.Width
      Picture2.Height = ShockwaveFlash1.Height
      Picture2.AutoRedraw = True
      Picture2.Move Screen.Width
      Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
      ShockwaveFlash1.Movie = "c:\106.swf"
    End SubPrivate Sub Command1_Click()
      DoEvents
      Call keybd_event(vbKeySnapshot, 1, 0, 0)
      Call CatchPicture
    End SubPrivate Sub Command2_Click()
      Unload Me
    End SubSub CatchPicture()
      DoEvents
      Picture1.Picture = Clipboard.GetData(vbCFBitmap)
      BitBlt Picture2.hDC, 0, 0, ShockwaveFlash1.Width \ 15, ShockwaveFlash1.Height \ 15, Picture1.hDC, ShockwaveFlash1.Left \ 15, ShockwaveFlash1.Top \ 15, vbSrcCopy
      SavePicture Picture2.Image, "C:\TT.BMP"
      'MsgBox "抓屏完成!"
    End Sub
      

  5.   

    调用glReadPixels之前,使用初始化它
    http://www.itye.org/archives/915