avoid flicker when registering components

svn path=/trunk/; revision=34638
This commit is contained in:
Matthias Kupfer 2008-07-21 15:52:52 +00:00
parent e9973c3d3a
commit 3f38468f23

View file

@ -1813,6 +1813,7 @@ ProcessPageDlgProc(HWND hwndDlg,
{
PSETUPDATA SetupData;
PREGISTRATIONNOTIFY RegistrationNotify;
static UINT oldActivityID = -1;
WCHAR Title[64];
/* Retrieve pointer to the global setup data */
@ -1864,13 +1865,18 @@ ProcessPageDlgProc(HWND hwndDlg,
{
WCHAR Activity[64];
RegistrationNotify = (PREGISTRATIONNOTIFY) lParam;
if (0 != LoadStringW(hDllInstance, RegistrationNotify->ActivityID,
// update if necessary only
if (oldActivityID != RegistrationNotify->ActivityID)
{
if (0 != LoadStringW(hDllInstance, RegistrationNotify->ActivityID,
Activity,
sizeof(Activity) / sizeof(Activity[0])))
{
SendDlgItemMessageW(hwndDlg, IDC_ACTIVITY, WM_SETTEXT,
0, (LPARAM) Activity);
}
oldActivityID = RegistrationNotify->ActivityID;
}
SendDlgItemMessageW(hwndDlg, IDC_ITEM, WM_SETTEXT, 0,
(LPARAM)(NULL == RegistrationNotify->CurrentItem ?
L"" : RegistrationNotify->CurrentItem));