Suppose that I define a dialog called MyDialog which inherits from CDialog
MyDialog has a CEditBox which is defined in resource as following
EDITTEXT IDC_AMOUNT,40,127,35,14
PUSHBUTTON "OK",IDOK,51,193,50,14
Here is MyDialog's DoDataExchange
void MyDialog::DoDataExchange(CDataExchange* pDX)
{
DDX_Text(pDX, IDC_AMOUNT, amount);
}
amount is a variable of type double. I understand that if I input a value which is not a double to IDC_AMOUNT control and press OK, MFC show the message box with the following message
Please enter a number
But I wonder if I hide the CEditBox with the following statements:
CWnd* pWnd=GetDlgItem(IDC_AMOUNT);
ASSERT(pWnd);
pWnd->ShowWindow(FALSE);
then after that when I press OK does MFC perform validation agains IDC_AMOUNT. In other words, does MFC perform validation agains hidden controls?