hello,
considering that there's no DateTimePicker control in IS X (and i need to use it), i've created a function that launches a mfc dialog and returns some data, something like:
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

custom dialog questions
Started by
cristraum
, Aug 25 2005 12:25
2 replies to this topic
Posted 25 August 2005 - 12:25
CODE |
INT __declspec(dllexport) __stdcall SdCustomDlg(HWND hISWnd, char *pszData) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); CWnd *parent = CWnd::FromHandle(hISWnd); if ( parent ) { CMyDialog dlg(parent); if (dlg.DoModal() == IDOK) strncpy(pszData, dlg.m_szData, SOME_LEN); } return 0; } |
this function is exported by a dll and i call it from install script, in OnFirstUIBefore():
CODE |
Dlg_SdPrevDlg: nResult = SdPrevDlg(...); /* check result */ Dlg_SdCustomDlg: hMsi = GetWindowHandle(HWND_INSTALL); nResult = myDLL.SdCustomDlg(hMsi, ...); /* check result */ Dlg_SdNextDlg: nResult = SdNextDlg(...); |
the problem i have is that this dialog box is displayed on top of the previous window. there's also a brief moment between clicking next or cancel in the custom dialog and viewing the next dialog when the previous window is visible. could the handle returned by GetWindowHandle(HWND_INSTALL) be used to somehow access the wizard sheet and to insert a page created by me?
as a workaround, i've tried hiding the main UI before launching the dialog, by calling
CODE |
Dlg_SdCustomDlg: ShowWindow(hMSI, SW_HIDE); /* ...launch custom dialog */ ShowWindow(hMSI, SW_SHOW); |
,
but this does not work. is there a way to hide the UI using some other install script function (and then to restore it later)?
best wishes,
cristian.traum
but this does not work. is there a way to hide the UI using some other install script function (and then to restore it later)?
best wishes,
cristian.traum
Edited by cristraum, 25 August 2005 - 18:23.
Posted 26 August 2005 - 22:33
Call
Disable(DIALOGCACHE);
before you call your DLL dialog.
Disable(DIALOGCACHE);
before you call your DLL dialog.
Stefan Krüger
InstallSite.org twitter facebook