I am still waiting for the answer to the below question. did any body come
across of "Unhadled Exception" error while developing a GUI based client in
vc++
thanks
mhassan wrote:
>
> i am developing a fix based GUI client in VS6, its a dialog
>
> when i got the success message in Application::onLogon(), i am trying to
> update a label in the dialog but it gives error "Unhandled Exception
> (MFC42D.DLL) 0xC0000005: access violation".
>
>
> here is the piece of code i am trying in onLogon
>
> HWND hw=hWnd;
> CWnd* pWnd = CWnd::FromHandle(hWnd);
>
> LSEClientDlg* pDlg = (LSEClientDlg*) pWnd;
> ThreadFunction = LSEClientDlg::DlgFunction;
> ThreadFunction((LPVOID)pDlg, "Connected");
>
> i am calling a static function of dialog and in the dialog method
>
> void LSEClientDlg::DlgFunction(
> LPVOID pObj, CString str)
> {
> LSEClientDlg* pDlg = (LSEClientDlg*) pObj;
> pDlg->ud(str);
>
> }
>
>
> void LSEClientDlg::ud(CString msg)
> {
> this->m_connection_status = msg ;
> UpdateData(FALSE);
>
> }
>
>
> the line
>
> this->m_connection_status = msg ;
>
> is getting the access violation error.
>
> Any help very much appreciated.
>
> thanks
> m. hassan
>
>
--
View this message in context: http://www.nabble.com/trade-client-dialog-access-violation-error-tp20012403p20297832.html
Sent from the QuickFIX - Dev mailing list archive at Nabble.com.
|