how to use DDV_MinMaxInt?

This is a discussion on how to use DDV_MinMaxInt? within the Windows Programming forums, part of the Platform Specific Boards category; I'm doing a C++ MFC, I try to use DDV_MinMax but when I compile, I got the error message: D:\codes\Dialog1\Dialog1Dlg.cpp(101) ...

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    163

    how to use DDV_MinMaxInt?

    I'm doing a C++ MFC, I try to use DDV_MinMax but when I compile, I got the error message:
    D:\codes\Dialog1\Dialog1Dlg.cpp(101) : error C2065: 'DDV_MinMax' : undeclared identifier

    But I thought DDV_MinMax is a standard function? Can anyone help me out? THanks! Below is my code

    Code:
    void CDialog1Dlg::DoDataExchange(CDataExchange* pDX)
    {
    	CDialog::DoDataExchange(pDX);
    
    	//{{AFX_DATA_MAP(CDialog1Dlg)
    	DDX_Control(pDX, IDC_LIST_CTRL, m_cListCtrl);
    	DDX_Control(pDX, IDC_NAMELIST, m_NameList);
    	DDX_Text(pDX, IDC_FIRSTNAME, m_strFirstName);
    	DDX_Text(pDX, IDC_LASTNAME, m_strLastName);
    	DDX_CBIndex(pDX, IDC_TITLE, m_strTitle);
    	DDX_Text(pDX, IDC_nocluster, m_nocluster);
    	DDX_Control(pDX, IDC_CHARTCTRL, m_ChartCtrl);
    	//}}AFX_DATA_MAP
    	
    	DDV_MinMax(pDX, m_strLastName, 0, 1);
    }

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    7,318
    A quick search on MSDN shows that there is a DDV_MinMaxInt and other DDV_MinMaxXXX functions. Perhaps you wanted one of those.

    http://msdn.microsoft.com/library/de..._MinMaxInt.asp

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    12
    Quote Originally Posted by franziss
    [...] Below is my code

    Code:
    void CDialog1Dlg::DoDataExchange(CDataExchange* pDX)
    {
    	CDialog::DoDataExchange(pDX);
    
    	. . .
    	
    	DDV_MinMax(pDX, m_strLastName, 0, 1);
    }
    There is no such function DDV_MinMax, your probably mean DDV_MinMaxInt.

    It seems your m_strLastName variable is of type CString, therefore I think you will not be able to use any of DDV_MinMaxXXX functions.

    I think you should give us more details about your intention in case of string values.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21