Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

MFC OnKillFocus

$
0
0

I have 2 edit boxes A & B.   A should be always larger than B.  Initially A =10, B =1.

I have DDX and DDV for both. DDV is check minimum value and maximum value allowed.

DDX_DoubleFormat (pDX, IDC_EDITA, m_dA);
DDX_DoubleFormat (pDX, IDC_EDITB, m_dB);

DDV_MinMax (pDX, m_dA,  m_dB, LARGENUMBER);
DDV_MinMax (pDX, m_dB, 0, m_dA);

This validation check pops an error panel, if I key in a bad B value, say, 20. So I key in a good value, 2.
Now I change focus, OnKillFocusA invokes DDV saying A must be larger than 20. Even if 20 is the bad value I entered and then later corrected.

Why?

Makoto


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>