More cosmetics

This commit is contained in:
Birunthan Mohanathas 2012-06-23 22:43:34 +03:00
parent aa583958d8
commit 8e6c1fb856
4 changed files with 31 additions and 15 deletions

View File

@ -234,7 +234,7 @@ INT_PTR CDialogInstall::OnCommand(WPARAM wParam, LPARAM lParam)
BeginInstall();
break;
case IDCLOSE:
case IDCANCEL:
if (!m_InstallThread)
{
EndDialog(m_Window, 0);
@ -844,17 +844,13 @@ bool CDialogInstall::InstallPackage()
void CDialogInstall::BeginInstall()
{
// Disable X button
HMENU systemMenu = GetSystemMenu(m_Window, FALSE);
EnableMenuItem(systemMenu, SC_CLOSE, MF_BYCOMMAND | MF_GRAYED | MF_DISABLED);
HWND item = GetDlgItem(m_Window, IDC_INSTALL_ADVANCED_BUTTON);
EnableWindow(item, FALSE);
item = GetDlgItem(m_Window, IDC_INSTALL_INSTALL_BUTTON);
EnableWindow(item, FALSE);
item = GetDlgItem(m_Window, IDCLOSE);
item = GetDlgItem(m_Window, IDCANCEL);
EnableWindow(item, FALSE);
item = GetDlgItem(m_TabInstall.GetWindow(), IDC_INSTALLTAB_THEME_CHECKBOX);

View File

@ -98,7 +98,12 @@ INT_PTR CALLBACK CDialogPackage::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP
return c_Dialog->OnNotify(wParam, lParam);
case WM_CLOSE:
{
if (!c_Dialog->m_PackagerThread)
{
EndDialog(hWnd, 0);
}
}
return TRUE;
case WM_DESTROY:
@ -158,12 +163,22 @@ INT_PTR CDialogPackage::OnCommand(WPARAM wParam, LPARAM lParam)
HWND item = GetDlgItem(m_Window, IDC_PACKAGE_CREATEPACKAGE_BUTTON);
EnableWindow(item, FALSE);
//item = GetDlgItem(m_TabInfo.GetWindow(), IDC_PACKAGE_INPROGRESS_TEXT);
//ShowWindow(item, SW_SHOWNORMAL);
item = GetDlgItem(m_Window, IDCANCEL);
EnableWindow(item, FALSE);
//item = GetDlgItem(m_TabInfo.GetWindow(), IDC_PACKAGE_PROGRESS);
//ShowWindow(item, SW_SHOWNORMAL);
//SendMessage(item, PBM_SETMARQUEE, (WPARAM)TRUE, 0);
m_TabOptions.Activate();
item = GetDlgItem(m_Window, IDC_PACKAGE_TAB);
TabCtrl_SetCurSel(item, 0);
EnableWindow(item, FALSE);
EnableWindow(m_TabOptions.GetWindow(), FALSE);
EnableWindow(m_TabAdvanced.GetWindow(), FALSE);
item = GetDlgItem(m_TabOptions.GetWindow(), IDC_INSTALLTAB_CREATING_TEXT);
ShowWindow(item, SW_SHOWNORMAL);
item = GetDlgItem(m_TabOptions.GetWindow(), IDC_INSTALLTAB_CREATING_BAR);
ShowWindow(item, SW_SHOWNORMAL);
SendMessage(item, PBM_SETMARQUEE, (WPARAM)TRUE, 0);
m_PackagerThread = (HANDLE)_beginthreadex(NULL, 0, PackagerThreadProc, this, 0, NULL);
if (!m_PackagerThread)
@ -343,8 +358,8 @@ unsigned __stdcall CDialogPackage::PackagerThreadProc(void* pParam)
if (dialog->CreatePackage())
{
// Stop the progress bar
// HWND item = GetDlgItem(dialog->m_Window, IDC_PACKAGE_PROGRESS);
// SendMessage(item, PBM_SETMARQUEE, (WPARAM)FALSE, 0);
HWND item = GetDlgItem(dialog->m_TabOptions.GetWindow(), IDC_INSTALLTAB_CREATING_BAR);
SendMessage(item, PBM_SETMARQUEE, (WPARAM)FALSE, 0);
FlashWindow(dialog->m_Window, TRUE);

View File

@ -104,7 +104,7 @@ IDD_PACKAGEOPTIONS_TAB DIALOGEX 15, 30, 270, 220
STYLE DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg 2"
{
LTEXT "Save package to:", IDC_STATIC, 0, 0, 270, 9
LTEXT "Save package to:", IDC_STATIC, 0, 0, 264, 9
EDITTEXT IDC_PACKAGEOPTIONS_FILE_EDIT, 0, 17, 240, 14, ES_READONLY | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
PUSHBUTTON "...", IDC_PACKAGEOPTIONS_FILEBROWSE_BUTTON, 245, 17, 25, 14, WS_TABSTOP
@ -122,6 +122,9 @@ FONT 8, "MS Shell Dlg 2"
EDITTEXT IDC_PACKAGEOPTIONS_RAINMETERVERSION_EDIT, 96, 177, 80, 14
LTEXT "Windows version:", IDC_STATIC, 6, 198, 85, 9
COMBOBOX IDC_PACKAGEOPTIONS_WINDOWSVERSION_COMBO, 96, 195, 80, 14, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Creating...", IDC_INSTALLTAB_CREATING_TEXT, 0, 0, 270, 100, NOT WS_VISIBLE
CONTROL "", IDC_INSTALLTAB_CREATING_BAR, "msctls_progress32", PBS_MARQUEE | NOT WS_VISIBLE | WS_BORDER, 0, 15, 270, 11
}
IDD_PACKAGEADVANCED_TAB DIALOGEX 15, 30, 270, 220

View File

@ -47,6 +47,8 @@
#define IDC_PACKAGEOPTIONS_LOADTHEME_COMBO 1007
#define IDC_PACKAGEOPTIONS_RAINMETERVERSION_EDIT 1008
#define IDC_PACKAGEOPTIONS_WINDOWSVERSION_COMBO 1009
#define IDC_INSTALLTAB_CREATING_TEXT 1010
#define IDC_INSTALLTAB_CREATING_BAR 1011
#define IDC_PACKAGEADVANCED_HEADER_EDIT 1000
#define IDC_PACKAGEADVANCED_HEADERROWSE_BUTTON 1001