Skip to content

Commit

Permalink
support resizable mediainfo page (#2770)
Browse files Browse the repository at this point in the history
  • Loading branch information
adipose committed May 2, 2024
1 parent 449b04b commit 330c65b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/mpc-hc/PPageFileInfoSheet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ BOOL CPPageFileInfoSheet::OnInitDialog()
CRect r;
GetDlgItem(ID_APPLY_NOW)->GetWindowRect(&r);
ScreenToClient(r);
RemoveAnchor(IDOK); //otherwise it crashes when we add it later
AddAnchor(IDOK, BOTTOM_LEFT);
GetDlgItem(IDOK)->MoveWindow(r);

r.MoveToX(5);
Expand All @@ -84,6 +86,8 @@ BOOL CPPageFileInfoSheet::OnInitDialog()

CMPCThemeUtil::enableWindows10DarkFrame(this);

AddAnchor(IDC_BUTTON_MI, BOTTOM_LEFT);

return FALSE; // return TRUE unless you set the focus to a control
}

Expand Down
8 changes: 5 additions & 3 deletions src/mpc-hc/PPageFileMediaInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ using namespace MediaInfoDLL;

// CPPageFileMediaInfo dialog

IMPLEMENT_DYNAMIC(CPPageFileMediaInfo, CMPCThemePropertyPage)
IMPLEMENT_DYNAMIC(CPPageFileMediaInfo, CMPCThemeResizablePropertyPage)
CPPageFileMediaInfo::CPPageFileMediaInfo(CString path, IFileSourceFilter* pFSF, IDvdInfo2* pDVDI, CMainFrame* pMainFrame)
: CMPCThemePropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
: CMPCThemeResizablePropertyPage(CPPageFileMediaInfo::IDD, CPPageFileMediaInfo::IDD)
, m_fn(path)
, m_path(path)
, m_bSyncAnalysis(false)
Expand Down Expand Up @@ -174,7 +174,7 @@ BOOL CPPageFileMediaInfo::PreTranslateMessage(MSG* pMsg)
return __super::PreTranslateMessage(pMsg);
}

BEGIN_MESSAGE_MAP(CPPageFileMediaInfo, CMPCThemePropertyPage)
BEGIN_MESSAGE_MAP(CPPageFileMediaInfo, CMPCThemeResizablePropertyPage)
ON_WM_SHOWWINDOW()
ON_WM_DESTROY()
ON_MESSAGE_VOID(WM_MEDIAINFO_READY, OnMediaInfoReady)
Expand Down Expand Up @@ -222,6 +222,8 @@ BOOL CPPageFileMediaInfo::OnInitDialog()
});
}

AddAnchor(IDC_MIEDIT, TOP_LEFT, BOTTOM_RIGHT);

return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
Expand Down
4 changes: 2 additions & 2 deletions src/mpc-hc/PPageFileMediaInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@

#include <future>
#include "mpc-hc_config.h"
#include "CMPCThemePropertyPage.h"
#include "CMPCThemeResizablePropertyPage.h"
#include "CMPCThemeEdit.h"

// CPPageFileMediaInfo dialog

class CPPageFileMediaInfo : public CMPCThemePropertyPage
class CPPageFileMediaInfo : public CMPCThemeResizablePropertyPage
{
DECLARE_DYNAMIC(CPPageFileMediaInfo)

Expand Down

0 comments on commit 330c65b

Please sign in to comment.