No more flickering, cross your fingers for no bugs...
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1905 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
00faa19aac
commit
2887407beb
6 changed files with 18 additions and 19 deletions
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue