That shouldn't have gotten in there...
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3077 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
570f1b0e75
commit
f9c8fd6682
1 changed files with 14 additions and 30 deletions
|
@ -353,7 +353,8 @@ static int CALLBACK WINAPI BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lPara
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
BOOL bMainShown = FALSE;
|
||||
|
||||
|
||||
BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (uMsg == WM_INITDIALOG || uMsg == WM_NOTIFY_OUTER_NEXT)
|
||||
|
@ -380,11 +381,11 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
m_hwndOK=GetDlgItem(hwndDlg,IDOK);
|
||||
m_hwndCancel=GetDlgItem(hwndDlg,IDCANCEL);
|
||||
SetDlgItemTextFromLang(hwndDlg,IDC_VERSTR,LANG_BRANDING);
|
||||
SetClassLong(hwndDlg,GCL_HICON,(long)g_hIcon);
|
||||
SetClassLong(hwndDlg,GCL_HICON,(long)g_hIcon);
|
||||
#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
|
||||
g_quit_flag = ExecuteCodeSegment(g_header->code_onGUIInit,NULL);
|
||||
if (!(g_quit_flag = ExecuteCodeSegment(g_header->code_onGUIInit,NULL)))
|
||||
#endif
|
||||
//ShowWindow(hwndDlg,SW_SHOW);
|
||||
ShowWindow(hwndDlg,SW_SHOW);
|
||||
}
|
||||
|
||||
this_page=g_pages+m_page;
|
||||
|
@ -421,7 +422,7 @@ nextPage:
|
|||
}
|
||||
else
|
||||
{
|
||||
HWND hwndtmp, newPage;
|
||||
HWND hwndtmp;
|
||||
|
||||
int pflags = this_page->flags;
|
||||
|
||||
|
@ -455,10 +456,7 @@ nextPage:
|
|||
}
|
||||
#endif //NSIS_SUPPORT_CODECALLBACKS
|
||||
|
||||
if (this_page->wndproc_id != PWP_COMPLETED) {
|
||||
// Done inside WM_NOTIFY_CUSTOM_READY
|
||||
//DestroyWindow(m_curwnd);
|
||||
}
|
||||
if (this_page->wndproc_id != PWP_COMPLETED) DestroyWindow(m_curwnd);
|
||||
else {
|
||||
if (g_exec_flags.abort) SetFocus(m_hwndCancel);
|
||||
else if (g_exec_flags.autoclose) goto nextPage;
|
||||
|
@ -471,25 +469,25 @@ nextPage:
|
|||
|
||||
if (this_page->dlg_id > 0) // NSIS page
|
||||
{
|
||||
newPage=CreateDialogParam(
|
||||
m_curwnd=CreateDialogParam(
|
||||
g_hInstance,
|
||||
MAKEINTRESOURCE(this_page->dlg_id+dlg_offset),
|
||||
hwndDlg,winprocs[this_page->wndproc_id],(LPARAM)this_page
|
||||
);
|
||||
if (newPage)
|
||||
if (m_curwnd)
|
||||
{
|
||||
RECT r;
|
||||
|
||||
SetDlgItemTextFromLang(newPage,IDC_INTROTEXT,this_page->parms[0]);
|
||||
SetDlgItemTextFromLang(m_curwnd,IDC_INTROTEXT,this_page->parms[0]);
|
||||
|
||||
GetWindowRect(GetDlgItem(hwndDlg,IDC_CHILDRECT),&r);
|
||||
ScreenToClient(hwndDlg,(LPPOINT)&r);
|
||||
SetWindowPos(newPage,0,r.left,r.top,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER|SWP_NOREDRAW);
|
||||
SendMessage(hwndDlg, WM_NOTIFY_CUSTOM_READY, (WPARAM)newPage, 0);
|
||||
SetWindowPos(m_curwnd,0,r.left,r.top,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER);
|
||||
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
||||
ExecuteCodeSegment(this_page->showfunc,NULL);
|
||||
#endif //NSIS_SUPPORT_CODECALLBACKS
|
||||
SendMessage(newPage,WM_NOTIFY_START,0,0);
|
||||
ShowWindow(m_curwnd,SW_SHOWNA);
|
||||
SendMessage(m_curwnd,WM_NOTIFY_START,0,0);
|
||||
}
|
||||
|
||||
//XGE 5th September 2002 - Do *not* move the focus to the OK button if we are
|
||||
|
@ -513,23 +511,10 @@ nextPage:
|
|||
}
|
||||
#endif //NSIS_SUPPORT_BGBG
|
||||
|
||||
if (uMsg == WM_NOTIFY_CUSTOM_READY ) {
|
||||
SetWindowPos(m_curwnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW | SWP_NOREDRAW );
|
||||
if (uMsg == WM_NOTIFY_CUSTOM_READY) {
|
||||
DestroyWindow(m_curwnd);
|
||||
|
||||
m_curwnd = (HWND)wParam;
|
||||
|
||||
SetWindowPos(m_curwnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW );
|
||||
|
||||
if ( !bMainShown )
|
||||
{
|
||||
bMainShown = TRUE;
|
||||
SetWindowPos(hwndDlg, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_SHOWWINDOW | SWP_FRAMECHANGED);
|
||||
}
|
||||
|
||||
InvalidateRect(hwndDlg, NULL, TRUE);
|
||||
}
|
||||
|
||||
if (uMsg == WM_CLOSE)
|
||||
{
|
||||
if (!IsWindowEnabled(m_hwndCancel) && IsWindowEnabled(m_hwndOK))
|
||||
|
@ -574,7 +559,6 @@ nextPage:
|
|||
else
|
||||
{
|
||||
// Forward WM_COMMANDs to inner dialogs, can be custom ones
|
||||
// It allow inner dialogs to react on keyboard, ex: button can be clicked using the ENTER key
|
||||
SendMessage(m_curwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue