How to prevent the client area of the window from being cleared when the window is maximized, minimized or the window is resized?

  • Thread starter Thread starter Purple_Apple
  • Start date Start date
P

Purple_Apple

Guest
Hello, dear visitors of the forum. I am writing a Win 32 API application in C ++ using Visual Studio 2017 Community. I have the following question. How to prevent the client area of the window from being cleared when the window is maximized, minimized or the window is resized? For example, in the client area of the window of my application is the following picture.

1595982.png

But, for example, if I reduce the size of the window using the mouse for this, the picture will disappear.

1595983.png

(By the way, the progress bar also "creeps" to the right, but this is a topic for a separate post.)

The same thing (the disappearance of the picture) happens when I maximize the window or minimize it, and then open it and look. Please tell me how to prevent the picture from disappearing when resizing the window? Are there any special features in the Win 32 API for this? Or will I have to (at the first drawing of mesh) save the coordinates of the edges of the triangulation mesh in any collection, and then, after the window size has changed, actually redraw the triangulation mesh again using the data from the collection mentioned above? In MSDN, I, unfortunately, did not find any article about this (which surprised me a little). Help me, please, tell me how to solve the problem and make the picture does not disappear when the window is resized. I will be very grateful.

Continue reading...
 
Back
Top