In order to receive messages you need to create a window. It could be any window, a hidden one will do. Then you need to create the message handlers there.
From the error message you have provided it looks like you are trying to use the CRedDllApp as a message receiver.
The simplest thing for you to get started is to read this
] article here at Codeproject.
Once you have added the window to the project, create it in CRedDllApp::InitInstance(). Destroy it on CRedDllApp::ExitInstance().