delete "anonymous?" string
-
in the thread ... CString ThreadStr ; ThreadStr = "hiya" ; PostMessage((HWND)lParam,WM_USER_MYTHREAD_MESSAGE,NULL,(LPARAM)new CString(ThreadStr)) ; in the dialog ... LRESULT MyAppDlg::OnMyThreadMessage(WPARAM wParam, LPARAM lParam) { CString* cs = (CString*)lParam; How do I delete the new CString() ?
-
in the thread ... CString ThreadStr ; ThreadStr = "hiya" ; PostMessage((HWND)lParam,WM_USER_MYTHREAD_MESSAGE,NULL,(LPARAM)new CString(ThreadStr)) ; in the dialog ... LRESULT MyAppDlg::OnMyThreadMessage(WPARAM wParam, LPARAM lParam) { CString* cs = (CString*)lParam; How do I delete the new CString() ?
-
daveyerwin wrote:
LRESULT MyAppDlg::OnMyThreadMessage(WPARAM wParam, LPARAM lParam) { CString* cs = (CString*)lParam;
delete cs;
codito ergo sum
5!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder