Hello, everyone,
I'm learning Win programming and there is a page, which discuss management of state of windows.
Managing Application State (from Learn to Program for Windows in C++)
At the end of this article the template class is provided, which reduces boilerplate code (and makes it somehow safer) needed to create window and manage its state.
But I have the question: Why template is needed?
It seems, that proposed example should work if we use simple inheritance (of course, DERIVED_TYPE should be replaced with BaseWindow within the code of BaseWindow class implementation.
Possibly, this example is too simple and there may be cases, when simple inheritance is not enough. I would appreciate if some one would point me to such an example.
Thanks.
Dmitry Semikin