Home > Software engineering >  Vb graphics problems
Vb graphics problems

Time:10-10

Looking for 2 days can not find, can't let me ask the
1, what source HDC Bitblt API can be obtained, the strength, genuflect is begged Createbitmapfromfile, loadimage is invalid, loadimage out things with copy into the clipboard API is effective, but the draw is empty??? )
2, VB double-buffering concrete example (not use Autoredraw)
3, remove double buffer how to accelerate the rate of GDI + or read how to use GDI Png images

CodePudding user response:

The source of hDC? The transmission direction, if the copy from the window, it is the window of hDC, or GetDC
from the window
If you want to copy to the window, the source is a memory DC

A memory dc create general process is
CreateCompalitableDC
CreateCompatibleBitmap or CreateDibsection, the latter is relatively easy to add your own image data, data generally use memory copy kao into
Selectobject will bitmap into memory dc
Then the Bitblt

Used in VB, when Autoredraw set to true, is the buffer, according to the hDC is actually a memory DC, the DC GetDC should be used for of the window

CodePudding user response:

reference 1/f, worldy response:
source hDC? The transmission direction, if the copy from the window, it is the window of hDC, or GetDC
from the window
If you want to copy to the window, the source is a memory DC

A memory dc create general process is
CreateCompalitableDC
CreateCompatibleBitmap or CreateDibsection, the latter is relatively easy to add your own image data, data generally use memory copy kao into
Selectobject will bitmap into memory dc
Then the Bitblt

Used in VB, when Autoredraw set to true, is the buffer, according to the hDC is actually a memory DC, DC window should use GetDC to obtain


The problem is how to load the data picture
  •  Tags:  
  • API
  • Related