星期三, 4月 04, 2007

Windows Message Handling

void CAboutWindow::OnClose()
{ MessageBox(_T( "Closing the window!")) //Call the Base class member function, which will close the window. CWnd::OnClose() }
Reference: Windows Message Handling - Part 1
Reference: Windows Message Handling - Part 2


The most common problems people ask about are "How do I trap the ESC key so it doesn't terminate my application?" and "How do I trap the Enter key so it doesn't terminate my application?". These are easy.
Reference: Creating a Dialog-based App