Home > Software engineering >  For help! About from create Bitmap Graphics
For help! About from create Bitmap Graphics

Time:10-23

 
Declare the 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, & amp; HFFFF0000 'red background
GdipCreateBitmapFromGraphics 100, 100, graphics, bitmap 'create a copy of an existing

GdipBitmapGetPixel bitmap, 0, 0, color 'color
The Debug. Print Hex (color)

GdipDeleteGraphics graphics
GdipDisposeImage bitmap
TerminateGDIPlus


The key code is more than these
From the Graphics to create Bitmap
But in the end no matter how to color is 0
If use is normal from image files to create Graphics
For the great god help see where there is a problem

CodePudding user response:

http://download.csdn.net/detail/veron_04/4039695

CodePudding user response:

reference 1st floor Veron_04 response:
http://download.csdn.net/detail/veron_04/4039695


I was watching this tutorial
But only CreateBitmapFromGraphics
The bitmap has been empty but bitmap pointer is some

If you can send a viable source can?

CodePudding user response:

http://download.csdn.net/detail/veron_04/4814790
  •  Tags:  
  • API
  • Related