Some background: in order to learn GUI programming and drawing in Windows I'm starting to create my own GUI toolkit in Windows (so this is a didactic exercise, please don't suggest "use Qt" or "use MFC").
I would like to draw the entire window area from memory DCs in double buffering (thus also handling mouse and keyboard events myself) but I'm now wondering how should I handle resize events from the window: suppose I have a text control and a sidebar and my window gets a resize command
the sidebar should grow larger and the text control should show more text (it is also larger).
The first thing that comes to my mind is to redraw all the widgets on the memory DC and then BitBlt it to the screen. Anyway some widgets might not have changed at all or might be changed just a bit (the portion "Text here, text here, te" hasn't changed at all during the resize).
What can be done to exploit this fact and avoid redrawing (even in memory DC, not device DC) the parts which haven't changed?