title: MFC Data validation
body: <p>Suppose that I define a dialog called MyDialog which inherits from CDialog</p>
  
  <p>MyDialog has a CEditBox which is defined in resource as following</p>
  
  <pre><code>EDITTEXT        IDC_AMOUNT,40,127,35,14
  PUSHBUTTON      "OK",IDOK,51,193,50,14
  </code></pre>
  
  <p>Here is MyDialog's DoDataExchange</p>
  
  <pre><code>void MyDialog::DoDataExchange(CDataExchange* pDX)
  {
     DDX_Text(pDX, IDC_AMOUNT, amount);
  }
  </code></pre>
  
  <p>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</p>
  
  <pre><code>Please enter a number
  </code></pre>
  
  <p>But I wonder if I hide the CEditBox with the following statements:</p>
  
  <pre><code>CWnd* pWnd=GetDlgItem(IDC_AMOUNT);
  ASSERT(pWnd);
  pWnd-&gt;ShowWindow(FALSE);
  </code></pre>
  
  <p>then after that when I press OK does MFC perform validation agains IDC_AMOUNT.
  In other words, does MFC perform validation agains hidden controls?</p>