E allora dovresti avere due file (ad esempio)

Programma.cpp
ProgrammaDlg.cpp

e nel primo avere una struttura del tipo

BEGIN_MESSAGE_MAP(...)
END_MESSAGE_MAP()

Cerca bene ...