diff options
Diffstat (limited to 'src/windows')
-rw-r--r-- | src/windows/leash/LeashAboutBox.cpp | 43 | ||||
-rw-r--r-- | src/windows/leash/LeashAboutBox.h | 1 | ||||
-rw-r--r-- | src/windows/leash/LeashView.cpp | 2 |
3 files changed, 37 insertions, 9 deletions
diff --git a/src/windows/leash/LeashAboutBox.cpp b/src/windows/leash/LeashAboutBox.cpp index 8c6f7f425b..d8e3fde09c 100644 --- a/src/windows/leash/LeashAboutBox.cpp +++ b/src/windows/leash/LeashAboutBox.cpp @@ -33,6 +33,7 @@ static char THIS_FILE[] = __FILE__; CLeashAboutBox::CLeashAboutBox(CWnd* pParent /*=NULL*/) : CDialog(CLeashAboutBox::IDD, pParent) + , m_bListModules(FALSE) { m_missingFileError = FALSE; @@ -244,20 +245,44 @@ BOOL CLeashAboutBox::OnInitDialog() CDialog::OnInitDialog(); // XXX - we need to add some sensible behavior on error. + // We need to get the version info and display it... SetVersionInfo(IDC_ABOUT_VERSION, IDC_ABOUT_COPYRIGHT); if (!CLeashApp::m_hToolHelp32 && !CLeashApp::m_hPsapi) m_missingFileError = TRUE; - m_radio_LeashDLLs.SetCheck(TRUE); - OnLeashModules(); - - // We need to get the version info and display it... - HighlightFirstItem(); - - if (!CLeashApp::m_hPsapi) - GetDlgItem(IDC_PROPERTIES)->EnableWindow(FALSE); - + if (m_bListModules) { + m_radio_LeashDLLs.SetCheck(TRUE); + OnLeashModules(); + + HighlightFirstItem(); + + if (!CLeashApp::m_hPsapi) + GetDlgItem(IDC_PROPERTIES)->EnableWindow(FALSE); + } else { + m_radio_LeashDLLs.ShowWindow(SW_HIDE); + GetDlgItem(IDC_NOT_LOADED_MODULES)->ShowWindow(SW_HIDE); + GetDlgItem(IDC_ALL_MODULES)->ShowWindow(SW_HIDE); + GetDlgItem(IDC_PROPERTIES)->ShowWindow(SW_HIDE); + GetDlgItem(IDC_STATIC_MODULES_LOADED)->ShowWindow(SW_HIDE); + GetDlgItem(IDC_STATIC_NO_OF_MODULES)->ShowWindow(SW_HIDE); + m_LB_DLLsLoaded.ShowWindow(SW_HIDE); + // shrink window, move 'OK' button + const int hideDiff = 175; + RECT okRect; + CWnd* pOK = GetDlgItem(IDOK); + pOK->GetWindowRect(&okRect); + ScreenToClient(&okRect); + pOK->SetWindowPos(0, okRect.left, okRect.top - hideDiff, + 0, 0, SWP_NOZORDER | SWP_NOSIZE); + RECT dlgRect; + GetWindowRect( &dlgRect ); + + SetWindowPos(0,0,0, + dlgRect.right-dlgRect.left, + dlgRect.bottom-dlgRect.top - hideDiff, + SWP_NOZORDER|SWP_NOMOVE); + } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } diff --git a/src/windows/leash/LeashAboutBox.h b/src/windows/leash/LeashAboutBox.h index 34e1dac313..c6dbfc1772 100644 --- a/src/windows/leash/LeashAboutBox.h +++ b/src/windows/leash/LeashAboutBox.h @@ -45,6 +45,7 @@ public: CButton m_radio_LeashDLLs; CListBox m_LB_DLLsLoaded; CString m_fileItem; + BOOL m_bListModules; //}}AFX_DATA diff --git a/src/windows/leash/LeashView.cpp b/src/windows/leash/LeashView.cpp index cfa985c6d6..34b6b7d8e7 100644 --- a/src/windows/leash/LeashView.cpp +++ b/src/windows/leash/LeashView.cpp @@ -2110,6 +2110,8 @@ LRESULT CLeashView::OnTrayIcon(WPARAM wParam, LPARAM lParam) VOID CLeashView::OnAppAbout() { CLeashAboutBox leashAboutBox; + // To debug loaded dlls: + // leashAboutBox.m_bListModules = TRUE; leashAboutBox.DoModal(); } |