summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-10-21 17:58:55 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-10-21 17:58:55 +0300
commit288a9dfe27ef00511ceed444b30a37ed3c90b086 (patch)
tree18c0e15a40957d3305763197392f78265283ff38
parented524786b80787a7c09993846b3e31d188ed41e9 (diff)
minor code cleaning
-rw-r--r--plugins/NewStory/src/history_control.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 5da4a8009d..afb1cd890a 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -7,23 +7,21 @@ HANDLE htuLog = 0;
void InitNewstoryControl()
{
htuLog = MTextRegister("Newstory", MTEXT_FANCY_DEFAULT | MTEXT_SYSTEM_HICONS);
- WNDCLASS wndclass = { 0 };
+
+ WNDCLASS wndclass = {};
wndclass.style = /*CS_HREDRAW | CS_VREDRAW | */CS_DBLCLKS | CS_GLOBALCLASS;
wndclass.lpfnWndProc = NewstoryListWndProc;
- wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = sizeof(void *);
wndclass.hInstance = g_plugin.getInst();
- wndclass.hIcon = NULL;
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
- wndclass.hbrBackground = NULL;
- wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = _T(NEWSTORYLIST_CLASS);
RegisterClass(&wndclass);
}
/////////////////////////////////////////////////////////////////////////
// Control utilities, types and constants
-struct NewstoryListData
+
+struct NewstoryListData : public MZeroedObject
{
HistoryArray items;
@@ -105,14 +103,8 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case WM_CREATE:
{
data = new NewstoryListData;
- data->scrollTopItem = 0;
- data->scrollTopPixel = 0;
- data->cachedMaxTopItem = 0;
- data->cachedMaxTopPixel = 0;
- data->hwndEditBox = 0;
SetWindowLongPtr(hwnd, 0, (LONG_PTR)data);
RecalcScrollBar(hwnd, data);
-
break;
}