|
-
April 4th, 2009, 03:44 AM
#16
Re: MFC - Cdialog::OnOK() in Thread
Well I'll have to dig through your Ariticle. For all the details
The worker function is as follows and it do seem to get started, but the button that it calls does a lot of work, and eventuall I get the Assertions:
Code:
UINT WorkerThreadProc( LPVOID Param ){
CFormHdrView *pCFV ;
pCFV = (CFormHdrView *)Param;
if(::gpCFVw_Hdr == NULL)::AfxMessageBox("Null Pointer");
pCFV->OnButtonTotlsRevs();
return TRUE;
}
That looks pretty light weight to me. I don't know if forcing the function Inline would help the thread cut further into my CFormView App with tons of CDialogs.
I guess when the manufacture of a product, which in this case is Microsoft, says the product is not intended to be used in a certain way, that pretty much draws the line. Accessing the GUI Objects from threads was "not the way the Objects were intended to used" ... that's a wrap.
Rate this post if it helped you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|