MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / InitListView

Method InitListView

src/windows/ChannelView.cpp:91–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91bool ChannelView::InitListView()
92{
93 m_origListWndProc = (WNDPROC) GetWindowLongPtr(m_listHwnd, GWLP_WNDPROC);
94 SetWindowLongPtr(m_listHwnd, GWLP_USERDATA, (LONG_PTR) this);
95 SetWindowLongPtr(m_listHwnd, GWLP_WNDPROC, (LONG_PTR) ListWndProc);
96
97#ifdef NEW_WINDOWS
98 ListView_SetExtendedListViewStyleEx(m_listHwnd, LVS_EX_DOUBLEBUFFER, LVS_EX_DOUBLEBUFFER);
99#endif
100
101 TCHAR nameStr[] = TEXT("Name");
102 LVCOLUMN col{};
103 col.mask = LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH | LVCF_FMT;
104 col.pszText = nameStr;
105 col.cx = ScaleByDPI(MEMBER_LIST_WIDTH - 25);
106 col.iSubItem = 0;
107 col.fmt = LVCFMT_LEFT;
108 ListView_InsertColumn(m_listHwnd, 0, &col);
109
110 SetWindowFont(m_listHwnd, g_MessageTextFont, TRUE);
111
112 return TRUE;
113}
114
115HTREEITEM ChannelView::GetPrevious(int parentIndex)
116{

Callers 1

CreateMethod · 0.80

Calls 1

ScaleByDPIFunction · 0.85

Tested by

no test coverage detected