
i
i
i
i
i
i
i
i
570 E. An MFC Template Program
helpfully add the code for most message handlers. Here is the code for
this one:
void CFwView::OnDraw(CDC
*
pDC){
// TO-DO: add draw code for drawing in the client area here
}
pDC is a pointer to a class which wraps up as a member variable (m hDC)
the device context handle (the HDC) we discussed earlier when talking
about the WM PAINT message in Appendix D. The class specification is
in file fwView.h and its implementation is in file fwView.cpp.
4. Class
CMainFrm. As you might guess from the naming convention,
this class is mostly independent of the program. A n object of this
class is responsible for providing the fram ...