Well, my second idea does not work. Instead of publishing a SpawnDialog
event, I have a CA that displays a message box. However, the Message box
does not show up. Here are my functions to display a message (see below).
I'm certain that GenMessageBox gets called, because I put up a message box
(via MessageBox user32 function) that displayed "MYMSGTEXT", and the text
was correct. Am I missing something?
extern "C" UINT __stdcall GenMessageBox(MSIHANDLE hInstall)
{
CString strMsg;
DWORD dw = 1024;
UINT uiRet = MsiGetProperty(hInstall,"MYMSGTEXT",strMsg.GetBuffer(1024),&dw);
strMsg.ReleaseBuffer(); // reclaim the buffer after the GetBuffer() call.
if( ERROR_SUCCESS!=MsiMessageBox(hInstall,strMsg,MB_ICONINFORMATION) ) {
MessageBox(GetActiveWindow(),"MsiMessageBox failed.","Test",0);
}
return ERROR_SUCCESS;
}
UINT MsiMessageBox(MSIHANDLE hInstall,LPCSTR pszMsg,DWORD dwOptions)
{
if( NULL==hInstall || NULL==pszMsg ) return -1;
PMSIHANDLE hRec = MsiCreateRecord(2);
MsiRecordSetString(hRec,0,pszMsg);
UINT uiRet = MsiProcessMessage(hInstall,INSTALLMESSAGE(INSTALLMESSAGE_USER
| dwOptions),hRec);
return uiRet;
}
On 2/1/07, Levi Wilson <[EMAIL PROTECTED]> wrote:
One clarification is that the restriction applies only to those control
> events with the same conditions. So you might be able to make it work if you
> change a property in the spawned dialog.
Can you clarify this? Here are all of the entries in my ControlEvent
table that pertain to the dialog that I am speaking about. I want the next
button to warn the user (via InfoDlg) when they are using "Local" mode. Are
you saying that If inside my InfoDlg, I publish a ControlEvent for the "OK"
button to set a property, and then condition my "NewDialog" event from the
SelectServerDlg on the property that the InfoDlg would change? I'm sorry if
I'm being obtuse. Another thing I could do is just add a CA that calls
MsiProcessMessage with MB_ICONINFORMATION to show the message as well. This
would achieve the same goal, correct?
====================================
ControlEvent Entries
====================================
SelectServerDlg Cancel SpawnDialog CancelDlg 1 1
SelectServerDlg Back NewDialog InstallDirDlg
1 1
SelectServerDlg Next [InfoDlgText] Hey, I'm
warning you. 1 1
SelectServerDlg Next NewDialog
VerifyReadyDlg 1 1
SelectServerDlg Next SpawnDialog InfoDlg
USELOCAL 1
SelectServerDlg Next SpawnWaitDialog WaitForCostingDlg
CostingComplete = 1 2
SelectServerDlg LocalCheck [STORAGETYPE] 1 USELOCAL="1" 1
SelectServerDlg LocalCheck [STORAGETYPE] 2 USELOCAL<>1 2
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users