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

Method Show

src/Windows/DockableWindow.cpp:95–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95int DockableWindow::Show(bool show) {
96 if (m_displayed == show)
97 return 0;
98
99 if (show && !m_registered) {
100 int ret = RegisterDockableDialog();
101 if (ret == -1)
102 return -1;
103 }
104
105 if (show) {
106 SendMessage(m_hNpp, NPPM_DMMSHOW, 0, (LPARAM)m_hwnd); //Show my window as requested
107 if (m_menuCmd != -1)
108 SendMessage(m_hNpp, NPPM_SETMENUITEMCHECK, (WPARAM)m_menuCmd, (LPARAM)TRUE); //Check the menu item
109
110 //Redraw window for clean sheet
111 InvalidateRect(m_hwnd, NULL, TRUE);
112 } else {
113 SendMessage(m_hNpp, NPPM_DMMHIDE, 0, (LPARAM)m_hwnd); //Hide my window as requested
114 if (m_menuCmd != -1)
115 SendMessage(m_hNpp, NPPM_SETMENUITEMCHECK, (WPARAM)m_menuCmd, (LPARAM)FALSE); //Uncheck the menu item
116 }
117
118 m_displayed = show;
119
120 return 0;
121}
122
123bool DockableWindow::IsVisible() {
124 return m_displayed;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected