<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : MFC DDV_MinMaxFloat does not work</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : General Discussion : MFC DDV_MinMaxFloat does not work]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 18:24:37 +0000</pubDate>
  <lastBuildDate>Tue, 03 Mar 2009 00:59:55 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=13538</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[MFC DDV_MinMaxFloat does not work : Hi,  DDX_Text in 2005 parse...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13538&amp;PID=46164&amp;title=mfc-ddv-minmaxfloat-does-not-work#46164</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 13538<br /><strong>Posted:</strong> 03 March 2009 at 12:59am<br /><br /><P>Hi,</P><DIV>&nbsp;</DIV><DIV>DDX_Text&nbsp; in 2005 parse "12Hello" as 12 so its reason that DDV_MaxMinFloat validate value right.</DIV><DIV>&nbsp;</DIV><DIV>So most easy way is to copy DDX_Text&nbsp;for float value from VC6 to your code and&nbsp;rename it to DDX_TextFloat.</DIV><DIV></DIV>]]>
   </description>
   <pubDate>Tue, 03 Mar 2009 00:59:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13538&amp;PID=46164&amp;title=mfc-ddv-minmaxfloat-does-not-work#46164</guid>
  </item> 
  <item>
   <title><![CDATA[MFC DDV_MinMaxFloat does not work : Hi Oleg,  One more doubt. In...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13538&amp;PID=46154&amp;title=mfc-ddv-minmaxfloat-does-not-work#46154</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3855">devam</a><br /><strong>Subject:</strong> 13538<br /><strong>Posted:</strong> 03 March 2009 at 12:03am<br /><br />Hi Oleg, <DIV>One more doubt. In your reply, you mentioned that we need to create our own DDX_Text for such an edit. But DDX_Text is not used for validation purposes, it is used to bind the control to a member variable. Did you mean that we implement our own DDV_MaxMinFloat?</DIV><DIV>How can we write our own DDX_Text to match our requirement of validating a string beginning with digits?</DIV>]]>
   </description>
   <pubDate>Tue, 03 Mar 2009 00:03:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13538&amp;PID=46154&amp;title=mfc-ddv-minmaxfloat-does-not-work#46154</guid>
  </item> 
  <item>
   <title><![CDATA[MFC DDV_MinMaxFloat does not work : Hi Oleg, Thanks for the response....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13538&amp;PID=46115&amp;title=mfc-ddv-minmaxfloat-does-not-work#46115</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3855">devam</a><br /><strong>Subject:</strong> 13538<br /><strong>Posted:</strong> 02 March 2009 at 7:46am<br /><br />Hi Oleg,<DIV>Thanks for the response. But I have already mentioned in the problem description that I want to know why this is happening, and if there is any solution available without having to code for validation ourselves. </DIV>]]>
   </description>
   <pubDate>Mon, 02 Mar 2009 07:46:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13538&amp;PID=46115&amp;title=mfc-ddv-minmaxfloat-does-not-work#46115</guid>
  </item> 
  <item>
   <title><![CDATA[MFC DDV_MinMaxFloat does not work : Hi, guess you need create own...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13538&amp;PID=46111&amp;title=mfc-ddv-minmaxfloat-does-not-work#46111</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 13538<br /><strong>Posted:</strong> 02 March 2009 at 7:37am<br /><br />Hi,<DIV>guess you need create own <FONT color=#020002 size=2>DDX_Text for such edit. See original one and change it.</DIV></FONT>]]>
   </description>
   <pubDate>Mon, 02 Mar 2009 07:37:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13538&amp;PID=46111&amp;title=mfc-ddv-minmaxfloat-does-not-work#46111</guid>
  </item> 
  <item>
   <title><![CDATA[MFC DDV_MinMaxFloat does not work : There is an edit box in the dialog...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13538&amp;PID=46073&amp;title=mfc-ddv-minmaxfloat-does-not-work#46073</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3855">devam</a><br /><strong>Subject:</strong> 13538<br /><strong>Posted:</strong> 02 March 2009 at 1:21am<br /><br />There is an edit box in the dialog which can take only floating point numbers&nbsp;<BR>To achieve following&nbsp;&nbsp;Dialog Data Validation of MFC is used<BR><FONT color=#020002 size=2>DDV_MinMaxFloat&nbsp;<BR>&nbsp;&nbsp;<BR>UpdateData(TRUE)&nbsp;will validate the values entered and and error message box is popped up automatically by the MFC Framework<BR>&nbsp;<BR>&nbsp;This is working fine in following scenarios:&nbsp;<BR>&nbsp;1. When the Edit box is empty&nbsp;<BR>&nbsp;2. Edit box has strings&nbsp;: For eg: Hello<BR>&nbsp;&nbsp;<BR><strong>&nbsp;But it is not working if a string starts with a numerical value. For eg: 12Hello</strong>&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;In this case Hello is truncated and only the value 12 is used for validation.&nbsp;<BR>&nbsp;This is not our requirement we need to pop up an error message box in this case as well.&nbsp;<BR></FONT><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>My Do DataExchange function looks something like this:</DIV><P>void<FONT size=2> </FONT><FONT color=#020002 size=2>MDSWDMOTNInterfaceDlg</FONT><FONT size=2>::</FONT><FONT color=#020002 size=2>DoDataExchange</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>CDataExchange</FONT><FONT size=2>* </FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>)</P><P>{</P><P></FONT><FONT color=#020002 size=2>CDialog</FONT><FONT size=2>::</FONT><FONT color=#020002 size=2>DoDataExchange</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>);</P><P></FONT><FONT color=#008000 size=2>//{{AFX_DATA_MAP(MDSWDMOTNInterfaceDlg::DoDat)</P></FONT><FONT size=2><P></FONT><FONT color=#020002 size=2>DDX_Control</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>IDC_EDIT_TIME_COST</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>m_EditTimeCost</FONT><FONT size=2>);</P><P></FONT><FONT color=#020002 size=2>DDX_Control</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>IDC_EDIT_TIME_WAVE</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>m_EditTimeWave</FONT><FONT size=2>);</P><P></FONT><FONT color=#020002 size=2>DDX_Text</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>IDC_EDIT_TIME_COST</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>m_fTimeCost</FONT><FONT size=2>);</P><P></FONT><FONT color=#020002 size=2>DDX_Text</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>IDC_EDIT_TIME_WAVE</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>m_fTimeWave</FONT><FONT size=2>);</P><P></FONT><FONT color=#020002 size=2>DDV_MinMaxFloat</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>,</FONT><FONT color=#020002 size=2>m_fTimeCost</FONT><FONT size=2>,(</FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2>)0,(</FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2>)</FONT><FONT color=#020002 size=2>MAX_FLOAT</FONT><FONT size=2>);</P><P></FONT><FONT color=#020002 size=2>DDV_MinMaxFloat</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>,</FONT><FONT color=#020002 size=2>m_fTimeWave</FONT><FONT size=2>,(</FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2>)0,(</FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2>)</FONT><FONT color=#020002 size=2>MAX_FLOAT</FONT><FONT size=2>);</P><P></FONT><FONT color=#020002 size=2>DDX_Control</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>IDC_CUSTOM_CHECK</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>m_CheckCustomOptions</FONT><FONT size=2>);</P><P></FONT><FONT color=#020002 size=2>DDX_Control</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>IDC_RADIO_COST</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>m_RadioCostOptimiz</FONT><FONT size=2>);</P><P></FONT><FONT color=#020002 size=2>DDX_Control</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>IDC_RADIO_WAVE</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>m_RadioCostWaveOptimiz</FONT><FONT size=2>);</P><P></FONT><FONT color=#020002 size=2>DDX_Control</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>IDC_EDIT_OPERINFO</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>m_OutputEdit</FONT><FONT size=2>);</P><P></FONT><FONT color=#020002 size=2>DDX_Text</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>IDC_EDIT_OPERINFO</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>m_strOpraInfo</FONT><FONT size=2>);</P><P></FONT><FONT color=#020002 size=2>DDX_Control</FONT><FONT size=2>(</FONT><FONT color=#020002 size=2>pDX</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>IDC_BUTTON_PLAN</FONT><FONT size=2>, </FONT><FONT color=#020002 size=2>m_PlanButton</FONT><FONT size=2>);</P><P></FONT><FONT color=#008000 size=2>//}}AFX_DATA_MAP</P></FONT><FONT size=2><P>}</P><DIV></DIV><P><FONT color=#020002><strong>Please let me know what is the reason for this and how to resolve it without writing our own code for validations.&nbsp;<BR></strong>&nbsp;&nbsp;<BR></FONT><strong><FONT color=#ff0000>&nbsp;Note:&nbsp;&nbsp;<BR>&nbsp;1. This code is written in Microsoft Visual Studio 2005<BR>&nbsp;2. If the same code is written in MS VC6 then MFC framework automatcally handles all scenarios and it working fine.</FONT></strong></FONT></P>]]>
   </description>
   <pubDate>Mon, 02 Mar 2009 01:21:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13538&amp;PID=46073&amp;title=mfc-ddv-minmaxfloat-does-not-work#46073</guid>
  </item> 
 </channel>
</rss>