The error refers to the code that starts the thread, not the thread procedure. You probably call it with ThreadProc1, and you should use &CNewSerialPrintDlg::ThreadProc1.