OSDN Git Service

PATCH: [ 3015396 ] Remove obsolete dll version checks
authorJochen Tucht <jtuc@users.sourceforge.net>
Sun, 13 Jun 2010 10:13:37 +0000 (10:13 +0000)
committerJochen Tucht <jtuc@users.sourceforge.net>
Sun, 13 Jun 2010 10:13:37 +0000 (10:13 +0000)
Src/DirColsDlg.cpp
Src/DirView.cpp
Src/FileFiltersDlg.cpp
Src/PluginsListDlg.cpp

index 1405c56..4dd6f34 100644 (file)
@@ -12,7 +12,6 @@
 #include "stdafx.h"
 #include "merge.h"
 #include "DirColsDlg.h"
-#include "dllver.h"
 #include <algorithm>
 
 #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);
 }
 
index 288f868..6490bd5 100644 (file)
@@ -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;
index 219e1fa..2b67ac1 100644 (file)
@@ -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<NMLVGETINFOTIP*>(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);
index c5d8acf..1b32ae4 100644 (file)
@@ -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);