From 01e2e633ef9c613464b84d8065d103d1112d4156 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 5 May 2020 19:03:57 +0300 Subject: NewStory: option to hide scrollbar --- plugins/NewStory/src/history_control.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins/NewStory/src/history_control.cpp') diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index f7225ef153..e851c0b768 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -242,7 +242,8 @@ struct NewstoryListData : public MZeroedObject scrollTopPixel = cachedMaxTopPixel; } - RecalcScrollBar(); + if (g_plugin.bOptVScroll) + RecalcScrollBar(); } int LayoutItem(int index) @@ -505,7 +506,10 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_CREATE: data = new NewstoryListData(hwnd); SetWindowLongPtr(hwnd, 0, (LONG_PTR)data); - data->RecalcScrollBar(); + if (!g_plugin.bOptVScroll) + SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_VSCROLL); + else + data->RecalcScrollBar(); break; // History list control messages -- cgit v1.2.3