Shaikh Sonny Aman’s Blog

previously www.mailtoaman.com

Why message maps, How message maps

( The article is taken from Kanitkar’s book)
//comserver visitors … )
Instead of using message maps we can think of using virtual functions to convert a message into a call to an appropriate handler. To understand how virtual functions can be used, look at the following code segment:

Class CFrameWnd
{
[...]

Why message maps, How message maps

( The article is taken from Kanitkar’s book)
//comserver visitors … )
Instead of using message maps we can think of using virtual functions to convert a message into a call to an appropriate handler. To understand how virtual functions can be used, look at the following code segment:

Class CFrameWnd
{
[...]

Why calling SetWindowText in PreSubclassWindow does not work for a Dialog

The OnInitDialog() follows the PreSubClassWindow(). So any initialization done in PreSubClassWindow() will be overwritten by the initializations that take place in OnInitDialog().
For this, say we called SetWindowText(L” My Dialog”) in PreSubClassWindow(). After a while when OnInitDialog() is being processed, a call to SetWindowText is called with the Caption which can be set using [...]

Why calling SetWindowText in PreSubclassWindow does not work for a Dialog

The OnInitDialog() follows the PreSubClassWindow(). So any initialization done in PreSubClassWindow() will be overwritten by the initializations that take place in OnInitDialog().
For this, say we called SetWindowText(L” My Dialog”) in PreSubClassWindow(). After a while when OnInitDialog() is being processed, a call to SetWindowText is called with the Caption which can be set using [...]