if (HWND hWnd = ListView_GetHeader(m_pList->m_hWnd))
m_ctlSortHeader.SubclassWindow(hWnd);
+ // Load the bitmaps used for the list view (to reflect diff status)
CBitmap bm;
VERIFY (m_imageList.Create (16, 16, ILC_MASK, 0, 1));
VERIFY (bm.LoadBitmap (IDB_LFILE));
bm.Detach();
m_pList->SetImageList (&m_imageList, LVSIL_SMALL);
+ // Restore column orders as they had them last time they ran
LoadColumnOrders();
+ // Display column headers (in appropriate order)
ReloadColumns();
- //m_ctlSortHeader.SetSortImage(m_sortColumn, m_bSortAscending);
-
- // Allow user to rearrange columns via drag&drop of headers
+ // Show selection across entire row.
+ // Also allow user to rearrange columns via drag&drop of headers
// if they have a new enough common controls
- // Also enable infotips & full row selection
- m_pList->SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP | LVS_EX_INFOTIP);
+ DWORD newstyle = 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))
+ newstyle |= LVS_EX_INFOTIP;
+ m_pList->SetExtendedStyle(newstyle);
// Disable CListViewEx's full row selection which only causes problems
// (tooltips and custom draw do not work!)
LVHITTESTINFO lvhti = {0};
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_pList->SubItemHitTest(&lvhti);
LPNMLVCUSTOMDRAW lplvcd = (LPNMLVCUSTOMDRAW)pNMHDR;
DIFFITEM ditem;
+ if (GetDllVersion(_T("comctl32.dll")) < PACKVERSION(4,71))
+ {
+ // LPNMLVCUSTOMDRAW->iSubItem not supported before comctl32 4.71
+ *pResult = CDRF_DODEFAULT;
+ return;
+ }
+
switch (lplvcd->nmcd.dwDrawStage)
{
case CDDS_PREPAINT: // Request prepaint notifications for each item.
+2003-09-06 Perry
+ PATCH: [ 800175 ] skip custom draw if comctl32.dll < 4.71
+ WinMerge: DirView.cpp
+
2003-09-02 Laoran
- [ 797957 ] correct line number for last real line (in statusbar)
+ PATCH: [ 797957 ] correct line number for last real line (in statusbar)
WinMerge: MergeEditView.cpp
2003-09-01 Laoran
- [ 798272 ] save settings for the dockable diff bar
+ PATCH: [ 798272 ] save settings for the dockable diff bar
WinMerge: ChildFrm.cpp ChildFrm.h MainFrm.cpp
2003-09-01 Kimmo