求助!关于从Graphics创建Bitmap
Declare Function GdipCreateBitmapFromGraphics Lib "gdiplus" (ByVal Width As Long, ByVal Height As Long, ByVal graphics As Long, bitmap As Long) As GpStatus
Dim bitmap As Long, graphics As Long
Dim color As Long
InitGDIPlus
GdipCreateFromHDC Me.hDC, graphics
GdipGraphicsClear graphics, &HFFFF0000 '红色底色
GdipCreateBitmapFromGraphics 100, 100, graphics, bitmap '创建一个现存的副本
GdipBitmapGetPixel bitmap, 0, 0, color '取色
Debug.Print Hex(color)
GdipDeleteGraphics graphics
GdipDisposeImage bitmap
TerminateGDIPlus
关键代码就是以上这些了
就是从Graphics创建Bitmap
但是最后不管怎么样取到的颜色都是0
如果用从图片文件创建Graphics就是正常的
求大神们帮忙看下哪里有问题 http://download.csdn.net/detail/veron_04/4039695
我就是看的这个教程
可是只有CreateBitmapFromGraphics
取得的bitmap一直是空的 但是bitmap指针是有的
如果可以的话发份可行的源码可以么?
http://download.csdn.net/detail/veron_04/4814790
补充:VB , API