in VC++/MFC under dialog-based application environment Memory DCs are deployed for faster graph drawing.
This dialog allows you to resize in the resize box.
# Maybe I'm thinking wrong, but...
In the WM_SIZE message, discard the memory DC and re-enter the new window size. On the other hand, by obtaining a memory DC, we are resizing it.
However, if the application is running and terminates incorrectly in the discarding part of the memory DC
I'm confused about the fact that
Five memory DCs have been created and transferred to the screen.
I would appreciate it if someone could give me guidance.
Thank you for your cooperation.
First of all, it would be better to show the target source code to resolve the issue sooner.I highly recommend it.
Now, I'm using memory DC myself, but I don't see any problems.
It also supports WM_SIZE and is processed in the following steps:
Compared to your own code, you may find a defect.
In particular, if you do not remove the bitmap being selected, you cannot discard it, so many bad things will happen.
In addition, there may be cases where exclusive processing (drawing at external timing) is required during resizing.
© 2022 OneMinuteCode. All rights reserved.