diff options
-rw-r--r-- | src/apps/mplayerc/FavoriteAddDlg.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/OpenDlg.cpp | 4 | ||||
-rw-r--r-- | src/apps/mplayerc/PPageOutput.cpp | 4 | ||||
-rw-r--r-- | src/apps/mplayerc/PlayerCaptureDialog.cpp | 8 | ||||
-rw-r--r-- | src/apps/mplayerc/PlayerListCtrl.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/ShaderCombineDlg.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/ShaderEditorDlg.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/mplayerc.cpp | 26 | ||||
-rw-r--r-- | src/apps/mplayerc/mplayerc.h | 1 |
9 files changed, 12 insertions, 39 deletions
diff --git a/src/apps/mplayerc/FavoriteAddDlg.cpp b/src/apps/mplayerc/FavoriteAddDlg.cpp index 5d40f27ac..60fc0b183 100644 --- a/src/apps/mplayerc/FavoriteAddDlg.cpp +++ b/src/apps/mplayerc/FavoriteAddDlg.cpp @@ -64,7 +64,7 @@ BOOL CFavoriteAddDlg::OnInitDialog() m_namectrl.AddString( m_fullname );
}
- ::CorrectComboListWidth( m_namectrl, GetFont() );
+ ::CorrectComboListWidth(m_namectrl);
m_bRememberPos = AfxGetAppSettings().bFavRememberPos;
m_bRelativeDrive = AfxGetAppSettings().bFavRelativeDrive;
diff --git a/src/apps/mplayerc/OpenDlg.cpp b/src/apps/mplayerc/OpenDlg.cpp index 67beddf49..70358e2ad 100644 --- a/src/apps/mplayerc/OpenDlg.cpp +++ b/src/apps/mplayerc/OpenDlg.cpp @@ -79,7 +79,7 @@ BOOL COpenDlg::OnInitDialog() if (!MRU[i].IsEmpty()) {
m_mrucombo.AddString(MRU[i]);
}
- CorrectComboListWidth(m_mrucombo, GetFont());
+ CorrectComboListWidth(m_mrucombo);
CRecentFileList& MRUDub = AfxGetAppSettings().MRUDub;
MRUDub.ReadList();
@@ -88,7 +88,7 @@ BOOL COpenDlg::OnInitDialog() if (!MRUDub[i].IsEmpty()) {
m_mrucombo2.AddString(MRUDub[i]);
}
- CorrectComboListWidth(m_mrucombo2, GetFont());
+ CorrectComboListWidth(m_mrucombo2);
if (m_mrucombo.GetCount() > 0) {
m_mrucombo.SetCurSel(0);
diff --git a/src/apps/mplayerc/PPageOutput.cpp b/src/apps/mplayerc/PPageOutput.cpp index c3554c83a..b11908d6b 100644 --- a/src/apps/mplayerc/PPageOutput.cpp +++ b/src/apps/mplayerc/PPageOutput.cpp @@ -190,7 +190,7 @@ BOOL CPPageOutput::OnInitDialog() }
- CorrectComboListWidth(m_iAudioRendererTypeCtrl, GetFont());
+ CorrectComboListWidth(m_iAudioRendererTypeCtrl);
//
IDirect3D9* pD3D = Direct3DCreate9(D3D_SDK_VERSION);
@@ -231,7 +231,7 @@ BOOL CPPageOutput::OnInitDialog() pD3D->Release();
}
- CorrectComboListWidth(m_iD3D9RenderDeviceCtrl, GetFont());
+ CorrectComboListWidth(m_iD3D9RenderDeviceCtrl);
UpdateData(FALSE);
diff --git a/src/apps/mplayerc/PlayerCaptureDialog.cpp b/src/apps/mplayerc/PlayerCaptureDialog.cpp index 6363959cf..3a8d6e271 100644 --- a/src/apps/mplayerc/PlayerCaptureDialog.cpp +++ b/src/apps/mplayerc/PlayerCaptureDialog.cpp @@ -368,8 +368,8 @@ static void SetupMediaTypes(IAMStreamConfig* pAMSC, CFormatArray<T>& tfa, CCombo int iDim = dim.SetCurSel(dim.FindStringExact(0, tfa.MakeDimensionName(pfe)));
// if (iDim < 0 && dim.GetCount()) dim.SetCurSel(iDim = 0);
- CorrectComboListWidth(type, type.GetParent()->GetFont());
- CorrectComboListWidth(dim, dim.GetParent()->GetFont());
+ CorrectComboListWidth(type);
+ CorrectComboListWidth(dim);
if (iDim >= 0) {
mt = ((CFormatElem<T>*)dim.GetItemData(iDim))->mt;
@@ -406,7 +406,7 @@ static bool SetupDimension(CFormatArray<T>& tfa, CComboBox& type, CComboBox& dim dim.SetItemData(dim.AddString(tfa.MakeDimensionName(pfe)), (DWORD_PTR)pfe);
}
- CorrectComboListWidth(dim, dim.GetParent()->GetFont());
+ CorrectComboListWidth(dim);
dim.SetCurSel(dim.FindStringExact(0, str));
dim.EnableWindow(dim.GetCount() > 0);
@@ -468,7 +468,7 @@ static void InitCodecList(CAtlArray<Codec>& codecs, CComboBox& box, const GUID& box.EnableWindow(box.GetCount() > 1);
- CorrectComboListWidth(box, box.GetParent()->GetFont());
+ CorrectComboListWidth(box);
LoadDefaultCodec(codecs, box, cat);
}
diff --git a/src/apps/mplayerc/PlayerListCtrl.cpp b/src/apps/mplayerc/PlayerListCtrl.cpp index ab9077d95..c190c49fa 100644 --- a/src/apps/mplayerc/PlayerListCtrl.cpp +++ b/src/apps/mplayerc/PlayerListCtrl.cpp @@ -777,7 +777,7 @@ CComboBox* CPlayerListCtrl::ShowInPlaceComboBox(int nItem, int nCol, CAtlList<CS CComboBox* pComboBox = DNew CInPlaceComboBox(nItem, nCol, lstItems, nSel);
pComboBox->Create(dwStyle, rect, this, IDC_COMBO1);
- CorrectComboListWidth(*pComboBox, GetFont());
+ CorrectComboListWidth(*pComboBox);
int width = GetColumnWidth(nCol);
if (pComboBox->GetDroppedWidth() < width) {
diff --git a/src/apps/mplayerc/ShaderCombineDlg.cpp b/src/apps/mplayerc/ShaderCombineDlg.cpp index 919f8ae6a..2ea9c14ed 100644 --- a/src/apps/mplayerc/ShaderCombineDlg.cpp +++ b/src/apps/mplayerc/ShaderCombineDlg.cpp @@ -106,7 +106,7 @@ BOOL CShaderCombineDlg::OnInitDialog() if (m_combo.GetCount()) {
m_combo.SetCurSel(0);
- CorrectComboListWidth(m_combo, GetFont());
+ CorrectComboListWidth(m_combo);
}
UpdateData(FALSE);
diff --git a/src/apps/mplayerc/ShaderEditorDlg.cpp b/src/apps/mplayerc/ShaderEditorDlg.cpp index 0884b5151..dc3dbb73a 100644 --- a/src/apps/mplayerc/ShaderEditorDlg.cpp +++ b/src/apps/mplayerc/ShaderEditorDlg.cpp @@ -248,7 +248,7 @@ BOOL CShaderEditorDlg::Create(CWnd* pParent) const AppSettings::Shader& s = AfxGetAppSettings().m_shaders.GetNext(pos);
m_labels.SetItemDataPtr(m_labels.AddString(s.label), (void*)&s);
}
- CorrectComboListWidth(m_labels, GetFont());
+ CorrectComboListWidth(m_labels);
m_nIDEventShader = SetTimer(1, 1000, NULL);
diff --git a/src/apps/mplayerc/mplayerc.cpp b/src/apps/mplayerc/mplayerc.cpp index 68574b6cf..3e63f8372 100644 --- a/src/apps/mplayerc/mplayerc.cpp +++ b/src/apps/mplayerc/mplayerc.cpp @@ -39,32 +39,6 @@ extern "C" { int mingw_app_type = 1;
}
-void CorrectComboListWidth(CComboBox& box, CFont* pWndFont)
-{
- int cnt = box.GetCount();
- if (cnt <= 0) {
- return;
- }
-
- CDC* pDC = box.GetDC();
- pDC->SelectObject(pWndFont);
-
- int maxw = box.GetDroppedWidth();
-
- for (int i = 0; i < cnt; i++) {
- CString str;
- box.GetLBText(i, str);
- int w = pDC->GetTextExtent(str).cx + 22;
- if (maxw < w) {
- maxw = w;
- }
- }
-
- box.ReleaseDC(pDC);
-
- box.SetDroppedWidth(maxw);
-}
-
HICON LoadIcon(CString fn, bool fSmall)
{
if (fn.IsEmpty()) {
diff --git a/src/apps/mplayerc/mplayerc.h b/src/apps/mplayerc/mplayerc.h index a44944fb2..88f55ddec 100644 --- a/src/apps/mplayerc/mplayerc.h +++ b/src/apps/mplayerc/mplayerc.h @@ -56,7 +56,6 @@ enum { ///////////////
-extern void CorrectComboListWidth(CComboBox& box, CFont* pWndFont);
extern HICON LoadIcon(CString fn, bool fSmall);
extern bool LoadType(CString fn, CString& type);
extern bool LoadResource(UINT resid, CStringA& str, LPCTSTR restype);
|