Creating Validation Routines

By Ken Pugh, ITworld |  How-to

Once the DDV is outside, you can set the
values dynamically from variables or expressions. For example:

void CSetWinner::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSetWinner)
//}}AFX_DATA_MAP
DDX_Text(pDX, IDC_WINNING_VALUE, m_winning_value);
int low_number = 1;
int high_number = 40;
DDV_MinMaxInt(pDX, m_winning_value, low_number,
high_number);
}

In the next column, we'll return to our examination of controls.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Spotlight on ...
Online Training

    Upgrade your skills and earn higher pay

    Readers to share their best tips for maximizing training dollars and getting the most out self-directed learning. Here’s what they said.

     

    Learn more

Answers - Powered by ITworld

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question
randomness