--- /dev/null
+/**
+ * @file WindowStyle.cpp
+ *
+ * @brief Utilities (trivial) for manipulating window style
+ */
+// RCS ID line follows -- this is updated by CVS
+// $Id$
+
+#include "StdAfx.h"
+#include "WindowStyle.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+
+/**
+ * @brief Add requested style(s) to windows current style
+ */
+void
+WindowStyle_Add(CWnd * pwnd, DWORD newStyle)
+{
+ DWORD style = pwnd->GetStyle();
+ style |= newStyle;
+ SetWindowLong(pwnd->m_hWnd, GWL_STYLE, style);
+}
--- /dev/null
+#ifndef WindowStyle_h_included
+#define WindowStyle_h_included
+
+void WindowStyle_Add(CWnd * pwnd, DWORD newStyle);
+
+#endif // WindowStyle_h_included
#include "7zCommon.h"
#include "OptionsDef.h"
#include "BCMenu.h"
+#include "WindowStyle.h"
#ifdef _DEBUG
#define new DEBUG_NEW
// Display column headers (in appropriate order)
ReloadColumns();
+ // Show selection all the time, so user can see current item even when
+ // focus is elsewhere (ie, on file edit window)
+ WindowStyle_Add(m_pList, LVS_SHOWSELALWAYS);
+
// 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 newstyle = LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP;
+ 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))
- newstyle |= LVS_EX_INFOTIP;
- m_pList->SetExtendedStyle(newstyle);
+ exstyle |= LVS_EX_INFOTIP;
+ m_pList->SetExtendedStyle(exstyle);
// Disable CListViewEx's full row selection which only causes problems
// (tooltips and custom draw do not work!)
cregexp.cpp csharp.cpp dcl.cpp filesup.cpp fortran.cpp html.cpp js.cpp
java.cpp list.cpp pascal.cpp perl.cpp php.cpp python.cpp rexx.cpp rsrc.cpp
sgml.cpp sh.cpp siod.cpp sql.cpp tcl.cpp tex.cpp xml.cpp
+ PATCH: [ 1157859 ] Add LVS_SHOWSELALWAYS style to dirview
+ Src: DirView.cpp
+ Common new files: WindowStyle.cpp WindowStyle.h
+
2005-03-05 Perry
Rename CDirFrame::SetFilter to CDirFrame::SetFilterStatusDisplay for easier greps.