When I compiled this program (from C++ Programming Language 4th edition):
main.cpp
#include #include #incl
Add #include "afxwin.h" in your source file. It will solve your issue.
#include "afxwin.h"