Step 1: #including the propper stuff
1) First, go into setting and set it so that it uses MFC as a static library
2) Then add #include
3) meanwhile, if you have
#include "windows.h" or #include "mmsystem.h"
put these two _above_ the #include "stdafx.h"
4) Be careful, the order in which you declare the #includes matters a lot!! (if the way you have it gives errors during compile, reorder them til it works).