aboutsummaryrefslogtreecommitdiff
path: root/c/listview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/listview.cpp')
-rw-r--r--c/listview.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/c/listview.cpp b/c/listview.cpp
index b4a61b4..6dfa888 100644
--- a/c/listview.cpp
+++ b/c/listview.cpp
@@ -22,7 +22,7 @@ ListView::ListView(const HWND hWndParent, const HMENU hMenu, const DWORD dwStyle
m_hWndParent, hMenu, GetModuleHandle(NULL), this));
if (require(SetProp(hWnd, L"this", (HANDLE)this)))
- m_prevProc = (WNDPROC)SetWindowLongPtr(hWnd,
+ m_proc0 = (WNDPROC)SetWindowLongPtr(hWnd,
GWLP_WNDPROC, (LONG_PTR)::WndProc);
ListView_SetExtendedListViewStyle(hWnd, LVS_EX_FULLROWSELECT);
@@ -42,8 +42,8 @@ int ListView::Height(int bHeader)
{
if (bHeader == -1)
bHeader = m_bHeader;
- const int iCount = ListView_GetItemCount(hWnd);
- return iCount? Dpi(bHeader? 27: 4)+iCount*Dpi(19): 0;
+ const int cItem = ListView_GetItemCount(hWnd);
+ return cItem? Dpi(bHeader? 27: 4)+cItem*Dpi(19): 0;
}
void ListView::ResizeColumns(int) {}
@@ -51,29 +51,29 @@ void ListView::ResizeColumns(int) {}
void ListView::UpdateTheme(const BOOL bThemeActive)
{
DWORD dwStyle;
- const wchar_t* wszTheme;
- WORD wAction;
+ const wchar_t* theme;
+ WORD action;
extern int g_bThemes;
if (!g_bThemes) return;
if (bThemeActive) {
dwStyle = LVS_EX_DOUBLEBUFFER;
- wszTheme = L"Explorer";
- wAction = UIS_SET;
+ theme = L"Explorer";
+ action = UIS_SET;
} else {
dwStyle = 0;
- wszTheme = NULL;
- wAction = UIS_CLEAR;
+ theme = NULL;
+ action = UIS_CLEAR;
}
/* Use modern "Explorer" theme. */
- SetWindowTheme(hWnd, wszTheme, NULL);
+ SetWindowTheme(hWnd, theme, NULL);
/* The modern theme requires double buffering. */
ListView_SetExtendedListViewStyleEx(hWnd, LVS_EX_DOUBLEBUFFER, dwStyle);
/* Hide focus rectangles. */
- SendMessage(hWnd, WM_UPDATEUISTATE, MAKEWPARAM(wAction, UISF_HIDEFOCUS), 0);
+ SendMessage(hWnd, WM_UPDATEUISTATE, MAKEWPARAM(action, UISF_HIDEFOCUS), 0);
}
LRESULT CALLBACK ListView::WndProc(const HWND hWnd, const UINT uMsg,
@@ -89,16 +89,16 @@ LRESULT CALLBACK ListView::WndProc(const HWND hWnd, const UINT uMsg,
break;
}
- return CallWindowProc(m_prevProc, hWnd, uMsg, wParam, lParam);
+ return CallWindowProc(m_proc0, hWnd, uMsg, wParam, lParam);
}
LRESULT CALLBACK WndProc(const HWND hWnd, const UINT uMsg, const WPARAM wParam,
const LPARAM lParam)
{
- ListView* const pLv = (ListView*)GetProp(hWnd, L"this");
+ ListView* const lv = (ListView*)GetProp(hWnd, L"this");
if (uMsg == WM_DESTROY)
RemoveProp(hWnd, L"this");
- return pLv? pLv->WndProc(hWnd, uMsg, wParam, lParam): FALSE;
+ return lv? lv->WndProc(hWnd, uMsg, wParam, lParam): FALSE;
}