diff --git a/Contrib/ExDLL/exdll.h b/Contrib/ExDLL/exdll.h index 32c73dbb..12bd6a55 100644 --- a/Contrib/ExDLL/exdll.h +++ b/Contrib/ExDLL/exdll.h @@ -11,6 +11,7 @@ // For page showing plug-ins #define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8) +#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd) #define NOTIFY_BYE_BYE 'x' typedef struct _stack_t { diff --git a/Contrib/InstallOptions/InstallerOptions.cpp b/Contrib/InstallOptions/InstallerOptions.cpp index 43fe0270..bf197a43 100644 --- a/Contrib/InstallOptions/InstallerOptions.cpp +++ b/Contrib/InstallOptions/InstallerOptions.cpp @@ -175,6 +175,7 @@ int bCancelEnabled = FALSE; // by ORTIM: 13-August-2002 int bCancelShow = FALSE; // by ORTIM: 13-August-2002 FieldType *pFields = NULL; +#define DEFAULT_RECT 1018 int nRectId = 0; int nNumFields = 0; int g_done; @@ -462,7 +463,7 @@ bool ReadSettings(void) { nNumFields = GetPrivateProfileInt("Settings", "NumFields", 0, pszFilename); - nRectId = GetPrivateProfileInt("Settings", "Rect", 1018, pszFilename); + nRectId = GetPrivateProfileInt("Settings", "Rect", DEFAULT_RECT, pszFilename); bBackEnabled = GetPrivateProfileInt("Settings", "BackEnabled", 0xFFFF0000, pszFilename); // by ORTIM: 13-August-2002 @@ -751,7 +752,7 @@ int createCfgDlg() } childwnd=FindWindowEx(hMainWindow,NULL,"#32770",NULL); // find window to replace - if (!childwnd) childwnd=GetDlgItem(hMainWindow,nRectId); + if (!childwnd || nRectId != DEFAULT_RECT) childwnd=GetDlgItem(hMainWindow,nRectId); if (!childwnd) { popstring(NULL); @@ -1003,10 +1004,9 @@ void showCfgDlg() { lpWndProcOld = (void *) SetWindowLong(hMainWindow,GWL_WNDPROC,(long)ParentWndProc); + SendMessage(hMainWindow, WM_NOTIFY_CUSTOM_READY, 0, 0); ShowWindow(hConfigWindow, SW_SHOWNA); - InvalidateRect(hConfigWindow,0,0); SetFocus(hNextButton); - LockWindowUpdate(0); g_done=0; diff --git a/Contrib/StartMenu/StartMenu.c b/Contrib/StartMenu/StartMenu.c index ecf954e2..07f4c21c 100644 --- a/Contrib/StartMenu/StartMenu.c +++ b/Contrib/StartMenu/StartMenu.c @@ -251,10 +251,9 @@ BOOL CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) AddFolderFromReg(HKEY_LOCAL_MACHINE); AddFolderFromReg(HKEY_CURRENT_USER); + SendMessage(hwParent, WM_NOTIFY_CUSTOM_READY, 0, 0); ShowWindow(hwndDlg, SW_SHOWNA); - InvalidateRect(hwndDlg,0,0); SetFocus(GetDlgItem(hwParent, IDOK)); - LockWindowUpdate(0); } break; case WM_COMMAND: diff --git a/Plugins/InstallOptions.dll b/Plugins/InstallOptions.dll index 764aae3c..11c49410 100644 Binary files a/Plugins/InstallOptions.dll and b/Plugins/InstallOptions.dll differ diff --git a/Plugins/StartMenu.dll b/Plugins/StartMenu.dll index 2eacbc1f..ec7d9a90 100644 Binary files a/Plugins/StartMenu.dll and b/Plugins/StartMenu.dll differ diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index cb685346..2d9486f1 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -73,6 +73,8 @@ static int num_sections; // update message used by DirProc and SelProc for space display #define WM_IN_UPDATEMSG (WM_USER+0xf) +#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd) + #define WM_TREEVIEW_KEYHACK (WM_USER+0x13) static int m_page=-1,m_abort,m_retcode,m_delta=1; @@ -122,8 +124,8 @@ static BOOL NSISCALL SetDlgItemTextFromLang_(HWND dlg, int id, int lid) { #define GetUIItem(it) GetDlgItem(hwndDlg,it) #ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT -#define HandleStaticBkColor() _HandleStaticBkColor(uMsg, wParam, lParam) -static BOOL NSISCALL _HandleStaticBkColor(UINT uMsg, WPARAM wParam, LPARAM lParam) { +#define HandleStaticBkColor() _HandleStaticBkColor(hwndDlg, uMsg, wParam, lParam) +static BOOL NSISCALL _HandleStaticBkColor(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (uMsg == WM_CTLCOLORSTATIC) { COLORREF color = GetWindowLong((HWND)lParam, GWL_USERDATA); if (color) { @@ -527,13 +529,6 @@ nextPage: { HWND hwndtmp; -#ifdef NSIS_SUPPORT_CODECALLBACKS - // lock display for custom pages to prevent flickering - // the custom page must unlock the display - if (this_page->id<0 && uMsg != WM_INITDIALOG) LockWindowUpdate(m_curwnd); - else LockWindowUpdate(0); -#endif - SetDlgItemTextFromLang(hwndDlg,IDOK,this_page->next); hwndtmp=GetDlgItem(hwndDlg,IDC_BACK); @@ -545,16 +540,17 @@ nextPage: process_string_fromtab(g_tmp+mystrlen(g_tmp),this_page->caption); my_SetWindowText(hwndDlg,g_tmp); +#ifdef NSIS_SUPPORT_CODECALLBACKS + if (ExecuteCodeSegment(this_page->prefunc,NULL) || this_page->id<0) + goto nextPage; +#endif //NSIS_SUPPORT_CODECALLBACKS + if (this_page->id!=NSIS_PAGE_COMPLETED) DestroyWindow(m_curwnd); else { if (g_autoclose) goto nextPage; return 0; } -#ifdef NSIS_SUPPORT_CODECALLBACKS - if (ExecuteCodeSegment(this_page->prefunc,NULL) || this_page->id<0) - goto nextPage; -#endif //NSIS_SUPPORT_CODECALLBACKS if (this_page->id>=0) // NSIS page { gDontFookWithFocus = 0; @@ -581,6 +577,9 @@ nextPage: } } } + if (uMsg == WM_NOTIFY_CUSTOM_READY) { + DestroyWindow(m_curwnd); + } if (uMsg == WM_CLOSE) { if (!IsWindowEnabled(m_hwndCancel) && IsWindowEnabled(m_hwndOK))