Home > Software engineering >  CbitMap copy image error
CbitMap copy image error

Time:04-30

Do a virtual oscilloscope, class defined in m_MEMDC and corresponding m_BITmap to hold the paint with good image already do double buffer, because the amount of data to be processed is bigger, so the definition of BITMAP can be used at the beginning, so when fails, a new set of temporary CDC and BITMAP, copies of the original image into a temporary BITMAP, and then release m_BITmap, CreateCompatibleBitmap again a big enough BITMAP, copy back, continue to drawing, the first copy is fine, but the second time appeared abnormal leucorrhea, the effect is as follows:

The code is as follows:
Below the m_dcPlot is above class members


If there is a better way, and the teaching
  • Related