Event handler in CWindow classes