Browse - Programming Tips - How can I see if a checkbox is checked?

Date: 2015oct21
OS: Windows
Keywords: button

Q.  How can I see if a checkbox is checked?

A.

Regular windows API (win32/win64):

if (IsDlgButtonChecked(hDlg, IDC_MYBUTTON)) { // somethng }
MFC:
if (m_mybutton.GetCheck()) { // something }