From 23df5644c2ce8209a8387257f8d6942736008663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 2 Mar 2022 22:03:00 +0100 Subject: Update code style. --- c/listview.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) (limited to 'c/listview.c') diff --git a/c/listview.c b/c/listview.c index 2c24048..40c3108 100644 --- a/c/listview.c +++ b/c/listview.c @@ -16,22 +16,21 @@ LvCreate(HMENU hMenu) HWND hLv; hLv = CreateWindowEx( - WS_EX_CLIENTEDGE, - WC_LISTVIEW, - TEXT(""), - WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP - |LVS_REPORT|LVS_NOSORTHEADER, - 0, 0, 0, 0, - HWnd, hMenu, GetModuleHandle(NULL), NULL + WS_EX_CLIENTEDGE, + WC_LISTVIEW, + TEXT(""), + WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP + |LVS_REPORT|LVS_NOSORTHEADER, + 0, 0, 0, 0, + HWnd, hMenu, GetModuleHandle(NULL), NULL ); LvPrevProc = (WNDPROC)SetWindowLongPtr(hLv, - GWLP_WNDPROC, (LONG_PTR)LvProc); + GWLP_WNDPROC, (LONG_PTR)LvProc); ListView_SetExtendedListViewStyle(hLv, LVS_EX_FULLROWSELECT); - SendMessage(hLv, WM_SETFONT, - (WPARAM)HfNormal, MAKELPARAM(FALSE, 0)); + SendMessage(hLv, WM_SETFONT, (WPARAM)HfNormal, MAKELPARAM(FALSE, 0)); return hLv; } @@ -53,16 +52,16 @@ LvProc(HWND hLv, UINT uMsg, WPARAM wParam, LPARAM lParam) extern HWND HElv; extern LPLVITEM LpLviElvSelection; - /* For the episode list view, the Enter key should not - * be handled by the dialog manager, but instead be sent - * along to the main window procedure, so that it may be - * handled by the NM_RETURN case in ElvHandleNotify. - */ + /* For the episode list view, the Enter key should not + * be handled by the dialog manager, but instead be sent + * along to the main window procedure, so that it may be + * handled by the NM_RETURN case in ElvHandleNotify. + */ if (hLv != HElv) break; lResult = CallWindowProc(LvPrevProc, hLv, uMsg, wParam, lParam); if (lParam && ((MSG *)lParam)->message == WM_KEYDOWN - && ((MSG *)lParam)->wParam == VK_RETURN) + && ((MSG *)lParam)->wParam == VK_RETURN) return DLGC_WANTMESSAGE; return lResult; } @@ -75,10 +74,8 @@ void LvSetTheme(HWND hLv, int bUseTheme) { ListView_SetExtendedListViewStyleEx(hLv, - LVS_EX_DOUBLEBUFFER, - bUseTheme ? LVS_EX_DOUBLEBUFFER : 0); + LVS_EX_DOUBLEBUFFER, bUseTheme ? LVS_EX_DOUBLEBUFFER : 0); SendMessage(hLv, WM_CHANGEUISTATE, - MAKEWPARAM(bUseTheme ? UIS_SET : UIS_CLEAR, - UISF_HIDEFOCUS), 0); + MAKEWPARAM(bUseTheme ? UIS_SET : UIS_CLEAR, UISF_HIDEFOCUS), 0); SetWindowTheme(hLv, bUseTheme ? TEXT("Explorer") : NULL, NULL); } -- cgit v1.2.3