Browse - Programming Tips - How can I show/hide a windows control?

Date: 2017apr27
Platform: win32
Language: C/C++

Q.  How can I show/hide a windows control?

A.
void showHideControl(HWND hDlg, const int idCtrl, const bool bShow) { const int show = bShow ? SW_SHOW : SW_HIDE; ShowWindow(GetDlgItem(hDlg, idCtrl), show); }