I have a wix bundle for testing that calls a Windows MFC dialog-based application (an EXE file.) As that application has "Cancel" button, when the user clicks it, I want to make the bundle fail intentionally. How can I do it?
Here is an excerpt from my app and I use PostQuitMessage(1603)
but it doesn't work.
BOOL CBundleUtilApp::InitInstance()
{
...
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
...
if( nResponse == IDCANCEL )
{
PostQuitMessage( 1603 );
}
m_pMainWnd = NULL;
return FALSE;
} // InitInstance()