Programming Tips - C/C++ on Win32: show/hide a windows control

Date: 2017apr27 Platform: win32 Language: C/C++ Q. C/C++ on Win32: show/hide a windows control A.
void showHideControl(const HWND hDlg, const int idCtrl, const bool bShow) { const int show = bShow ? SW_SHOW : SW_HIDE; ShowWindow(GetDlgItem(hDlg, idCtrl), show); }