How do I cause the OnEraseBackground message for a PropertyPage. RedrawWindow does not work
Posted on 2006-07-14
I have a dialog with a tab control that has a 1:1 relationship with its tabs and property pages multiple property pages stored in a map.
In the OnSize of my main dialog I call SizeTabControl which will properly size the tab control and call MoveWindow for each property page to position and size it.
When the program is running if I resize the dialog I always get the same background colour; the colour of the last page in the map.
What I want to do is show the colour of the currently selected tab. I think the solution is to call a method that would cause an
OnEraseBackground for that PropertyPage. I've tried to RedrawWindow but it does not cause OnEraseBackground.
I have read a couple of topics that mention InvalidateRect. Is this the proper solution and if it is how do you use it?