CEdit numbers
Hello,
I have a dialog-based app and I am having problems with getting
numbers displayed correctly.
Snippets of the code are the following:
// CCEditDlg dialog
class CCEditDlg : public CDialog
{
// Construction
public:
CCEditDlg(CWnd* pParent = NULL); // standard constructor
//CEdit
CEdit m_eEdit1;
// Dialog Data
enum { IDD = IDD_CEDIT_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
....
};
.... The class itself:
....
void CCEditDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_EDIT1, m_eEdit1);
}
BOOL CCEditDlg::OnInitDialog()
{
CDialog::OnInitDialog();
...
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
int a = 23;
m_eEdit1.SetDlgItemInt(IDC_EDIT1, a);
return TRUE; // return TRUE unless you set the focus to a control
}
I am getting m_eEdit1 not displayed at all. It is still empty. I have
VS 2008.
The edit control is configured as "Number" (TRUE).
What am I doing wrong?
Thank you very much in advance.
Best regards,
Hartwig