MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / VScrollTreeView

Method VScrollTreeView

src/Windows/FTPWindow.cpp:1708–1733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1706}
1707
1708int FTPWindow::VScrollTreeView(LONG yPos)
1709{
1710 static LONG scrollregion = TreeView_GetItemHeight(m_treeview.GetHWND()) * 4;
1711
1712 SCROLLINFO si{};
1713 si.cbSize = sizeof(SCROLLINFO);
1714 si.fMask = SIF_POS | SIF_RANGE;
1715 GetScrollInfo(m_treeview.GetHWND(), SB_VERT, &si);
1716 if (si.nPos == 0 && si.nMax == 0 && si.nMin == 0) return -1;
1717
1718
1719 RECT rect;
1720 if (GetWindowRect(m_treeview.GetHWND(), &rect))
1721 {
1722 int height = rect.bottom - rect.top;
1723 if (height <= 2 * scrollregion) return -1;
1724
1725 if (height - yPos <= scrollregion && si.nPos < si.nMax)
1726 SendMessage(m_treeview.GetHWND(), WM_VSCROLL, 1, 0);
1727 else if(yPos <= scrollregion && si.nPos > si.nMin)
1728 SendMessage(m_treeview.GetHWND(), WM_VSCROLL, 0, 0);
1729 }
1730
1731
1732 return 0;
1733}
1734
1735int FTPWindow::Chmod(FileObject * fo) {
1736 InputDialog id;

Callers

nothing calls this directly

Calls 1

GetHWNDMethod · 0.80

Tested by

no test coverage detected