diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-10 19:11:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-10 19:11:14 +0300 |
commit | bbf7a2bcf24ca620d44a397e1c289d25bcb03ec2 (patch) | |
tree | 0ae631c827851b0ff0a9416ecdda0ee3929befa3 /plugins/Import/src/wizard.cpp | |
parent | 74e6676bf5bf17dac4632d3c4bf95f4df19458f7 (diff) |
service for the custom import procedure
Diffstat (limited to 'plugins/Import/src/wizard.cpp')
-rw-r--r-- | plugins/Import/src/wizard.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Import/src/wizard.cpp b/plugins/Import/src/wizard.cpp index f7c4a4e68c..f23bf6ce1b 100644 --- a/plugins/Import/src/wizard.cpp +++ b/plugins/Import/src/wizard.cpp @@ -90,20 +90,18 @@ INT_PTR CALLBACK FinishedPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
{
- static HWND hwndPage;
+ static HWND hwndPage = nullptr;
+ bool bFirstLaunch = hwndPage == nullptr;
switch (message) {
case WM_INITDIALOG:
TranslateDialogDefault(hdlg);
- hwndPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_WIZARDINTRO), hdlg, WizardIntroPageProc);
- SetWindowPos(hwndPage, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
- ShowWindow(hwndPage, SW_SHOW);
- ShowWindow(hdlg, SW_SHOW);
Window_SetIcon_IcoLib(hdlg, GetIconHandle(IDI_IMPORT));
return TRUE;
case WIZM_GOTOPAGE:
- DestroyWindow(hwndPage);
+ if (hwndPage)
+ DestroyWindow(hwndPage);
EnableWindow(GetDlgItem(hdlg, IDC_BACK), TRUE);
EnableWindow(GetDlgItem(hdlg, IDOK), TRUE);
EnableWindow(GetDlgItem(hdlg, IDCANCEL), TRUE);
@@ -111,6 +109,8 @@ INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP hwndPage = CreateDialog(hInst, MAKEINTRESOURCE(wParam), hdlg, (DLGPROC)lParam);
SetWindowPos(hwndPage, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
ShowWindow(hwndPage, SW_SHOW);
+ if (bFirstLaunch)
+ ShowWindow(hdlg, SW_SHOW);
break;
case WIZM_DISABLEBUTTON:
|