MFC Applications

Initiate Mage
Joined
Mar 1, 2007
Messages
4
Reaction score
0
I'm trying to do the following and it's not working:

Code:
void WatchForProcess( void )
{
    CAppNameDlg AppNameDlgObject;
    AppNameDlgObject.WatchProcessCheckBox.SetCheck( BST_UNCHECKED );
}
 
void CAppNameDlg::OnWatchProcess( void ) 
{
    CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)WatchForProcess, NULL, 0, NULL );
}

Mind you there is a lot more code to this, but I removed it because it's not what I'm focusing on.

Does anyone know why I cannot manipulate the dialog from inside the thread?

It compiles just fine, but it doesn't work at all.
 
Back