You are declaring TimeProc as a pointer to a function which is totally incorrect.
It should be like:
// in the class definition in the header file:void CALLBACK TimeProc(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);
// and the declaration in the .cpp file:void CALLBACK CtestmmtimerDlg::TimeProc(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2)
// implementation code here
I entered this Connect bug found by a coworker. If you're a C++/CLI dev you may want to upvote it.
The /clr compiler issues an error whereas the C++ compiler (and clang/llvm on Mac) accept the template code. It's a template using std::is_base_of and isn't too crazy. There's no managed code involved at all in fact (ie. no ref classes).