Home > Software engineering >  MFC Picture control how to display images don't flash?
MFC Picture control how to display images don't flash?

Time:10-12

How can a little button on the image control loading a hard disk images such as: C: \ \ 1. BMP, shown on the image control and do not flash? Heard that double buffered somehow make?

CodePudding user response:

HBITMAP HBITMAP;
HBitmap=(hBitmap) : : LoadImage (: : GetModuleHandle (NULL), "test. BMP," IMAGE_BITMAP,
0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);
m_Pic. SetBitmap (hBitmap);

CodePudding user response:

It will flash

CodePudding user response:

BS_BITMAP CStatic: : SetBitmap ()

CodePudding user response:

refer to the original poster qqsq001 response:
how can a little button in the image control load on a hard disk images such as: C: \ \ 1. BMP, shown on the image control and do not flash? Heard that double buffered somehow make?


General processing OnEraseBackGround, direct return TRUE, if it has a control, the control should be set ClipChild, ClipSlibing

CodePudding user response:

Can say all points?
  • Related