Try to use the pView pointer as an argument pParam to AfxBeginThread call.
From worker threads (that is, other than main threads), AfxGetMainWnd may fail.