From 5beef67893472283c360330a8df1f1b6ab1174fa Mon Sep 17 00:00:00 2001 From: Jochen Tucht Date: Sun, 13 Jun 2010 10:13:37 +0000 Subject: [PATCH] PATCH: [ 3015396 ] Remove obsolete dll version checks --- Src/DirColsDlg.cpp | 10 ++-------- Src/DirView.cpp | 16 +++------------- Src/FileFiltersDlg.cpp | 16 ++-------------- Src/PluginsListDlg.cpp | 10 ++-------- 4 files changed, 9 insertions(+), 43 deletions(-) diff --git a/Src/DirColsDlg.cpp b/Src/DirColsDlg.cpp index 1405c56c1..4dd6f3446 100644 --- a/Src/DirColsDlg.cpp +++ b/Src/DirColsDlg.cpp @@ -12,7 +12,6 @@ #include "stdafx.h" #include "merge.h" #include "DirColsDlg.h" -#include "dllver.h" #include #ifdef _DEBUG @@ -63,13 +62,8 @@ END_MESSAGE_MAP() void CDirColsDlg::InitList() { // Show selection across entire row. - DWORD newstyle = LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT; - // Also enable infotips if they have new enough version for our - // custom draw code - // LPNMLVCUSTOMDRAW->iSubItem not supported before comctl32 4.71 - if (GetDllVersion(_T("comctl32.dll")) >= PACKVERSION(4,71)) - newstyle |= LVS_EX_INFOTIP; - m_listColumns.SetExtendedStyle(m_listColumns.GetExtendedStyle() | newstyle); + // Also enable infotips. + m_listColumns.SetExtendedStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); m_listColumns.InsertColumn(0, _T(""), LVCFMT_LEFT, 150); } diff --git a/Src/DirView.cpp b/Src/DirView.cpp index 288f8687b..6490bd559 100644 --- a/Src/DirView.cpp +++ b/Src/DirView.cpp @@ -39,7 +39,6 @@ #include "resource.h" #include "coretools.h" #include "WaitStatusCursor.h" -#include "dllver.h" #include "locality.h" #include "FileTransform.h" #include "SelectUnpackerDlg.h" @@ -332,14 +331,9 @@ void CDirView::OnInitialUpdate() ReloadColumns(); // Show selection across entire row. - // Also allow user to rearrange columns via drag&drop of headers - // if they have a new enough common controls - DWORD exstyle = LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP; - // Also enable infotips if they have new enough version for our - // custom draw code - // LPNMLVCUSTOMDRAW->iSubItem not supported before comctl32 4.71 - if (GetDllVersion(_T("comctl32.dll")) >= PACKVERSION(4, 71)) - exstyle |= LVS_EX_INFOTIP; + // Also allow user to rearrange columns via drag&drop of headers. + // Also enable infotips. + DWORD exstyle = LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP | LVS_EX_INFOTIP; m_pList->SetExtendedStyle(exstyle); } @@ -2620,10 +2614,6 @@ BOOL CDirView::OnHeaderEndDrag(LPNMHEADER hdr, LRESULT* pResult) */ void CDirView::FixReordering() { - // LVCOLUMN.iOrder is present with version 4.70+ - if (GetDllVersion(_T("shlwapi.dll")) < PACKVERSION(4, 70)) - return; - LVCOLUMN lvcol; lvcol.mask = LVCF_ORDER; lvcol.fmt = 0; diff --git a/Src/FileFiltersDlg.cpp b/Src/FileFiltersDlg.cpp index 219e1fa8c..2b67ac161 100644 --- a/Src/FileFiltersDlg.cpp +++ b/Src/FileFiltersDlg.cpp @@ -29,7 +29,6 @@ #include "MainFrm.h" #include "FileFiltersDlg.h" #include "coretools.h" -#include "dllver.h" #include "FileFilterMgr.h" #include "paths.h" #include "SharedFilterDlg.h" @@ -128,13 +127,8 @@ void FileFiltersDlg::SetSelected(const CString & selected) void FileFiltersDlg::InitList() { // Show selection across entire row. - DWORD newstyle = LVS_EX_FULLROWSELECT; - // Also enable infotips if they have new enough version for our - // custom draw code - // LPNMLVCUSTOMDRAW->iSubItem not supported before comctl32 4.71 - if (GetDllVersion(_T("comctl32.dll")) >= PACKVERSION(4,71)) - newstyle |= LVS_EX_INFOTIP; - m_listFilters.SetExtendedStyle(m_listFilters.GetExtendedStyle() | newstyle); + // Also enable infotips. + m_listFilters.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); String title = theApp.LoadString(IDS_FILTERFILE_NAMETITLE); m_listFilters.InsertColumn(0, title.c_str(), LVCFMT_LEFT, 150); @@ -332,12 +326,6 @@ void FileFiltersDlg::OnInfoTip(NMHDR * pNMHDR, LRESULT * pResult) NMLVGETINFOTIP * pInfoTip = reinterpret_cast(pNMHDR); ASSERT(pInfoTip); - if (GetDllVersion(_T("comctl32.dll")) < PACKVERSION(4,71)) - { - // LPNMLVCUSTOMDRAW->iSubItem not supported before comctl32 4.71 - return; - } - // Get subitem under mouse cursor lvhti.pt = m_ptLastMousePos; m_listFilters.SubItemHitTest(&lvhti); diff --git a/Src/PluginsListDlg.cpp b/Src/PluginsListDlg.cpp index c5d8acfe7..1b32ae408 100644 --- a/Src/PluginsListDlg.cpp +++ b/Src/PluginsListDlg.cpp @@ -10,7 +10,6 @@ #include "UnicodeString.h" #include "Merge.h" #include "Plugins.h" -#include "dllver.h" #include "PluginsListDlg.h" #include "OptionsDef.h" @@ -69,13 +68,8 @@ BOOL PluginsListDlg::OnInitDialog() void PluginsListDlg::InitList() { // Show selection across entire row. - DWORD newstyle = LVS_EX_FULLROWSELECT; - // Also enable infotips if they have new enough version for our - // custom draw code - // LPNMLVCUSTOMDRAW->iSubItem not supported before comctl32 4.71 - if (GetDllVersion(_T("comctl32.dll")) >= PACKVERSION(4,71)) - newstyle |= LVS_EX_INFOTIP; - m_list.SetExtendedStyle(m_list.GetExtendedStyle() | newstyle); + // Also enable infotips. + m_list.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); String title = LoadResString(IDS_PLUGINSLIST_NAME); m_list.InsertColumn(0, title.c_str(), LVCFMT_LEFT, 150); -- 2.11.0