FIX: Handling of Invalid Values in Class Wizard for DDX/DDVLast reviewed: September 16, 1997Article ID: Q108584 |
1.00 1.50 | 1.00 2.00
WINDOWS | WINDOWS NTkbprg kbfixlist kbbuglist kbfasttip The information in this article applies to:
SYMPTOMSUsing the Class Wizard included with Visual C++ to associate a member variable with a control on a dialog box causes the minimum and maximum values to be treated differently depending upon different variable types. RESOLUTION Currently, there is no workaround for the inconsistent auto-correction. Furthermore, once the auto-correction feature has changed a float or double to use scientific notation Class Wizard will fail when trying to modify the attributes of the control. The code with the scientific notation must be manually changed to a non-scientific floating point value to continue.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ 2.1.
MORE INFORMATIONWhen specifying that a variable will be of type int or uint, providing a value greater than its limit (see below) will cause an error to be displayed. However, setting a value that is over the limit for a long or DWORD is automatically corrected to the maximum value achievable in either direction. The following table details the behavior of these types for both the 16- and 32-bit editions:
Min. Limit Type Max. Limit Correction --------------------------------------------------------------------- -32768 int 32767 Warns user 0 uint 65535 Warns user -2147483647 long 2147483647 Automatic 0 DWORD 4294967295 AutomaticNOTE: For the 32-bit edition, the maximum negative value allowed for a long is -2147483648. There is an additional complication for variables of type float and double. Not only do they auto-correct, they also correct to a value given in scientific (exponential) format, which Class Wizard cannot parse. Class Wizard can save a value in that format but gives an error the next time the user tries to load Class Wizard for the same project. The Class Wizard will then appear but with no Class information. For more information, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q107465 TITLE : FIX: Class Wizard Floating-Point Parsing ErrorsThe following table details the limits of types float and double for the 16- and 32-bit editions:
Min. Limit Type Max. Limit ---------------------------------------------------------------------- -1.79769e+308 float 1.79769e+308 -1.79769313486232e+308 double 1.79769313486232e+308IMPORTANT NOTE: The 16-bit edition auto-corrects these values if the user- specified value exceeds them. However, the 32-bit edition sets the value to 1.#INF if the user-specified value exceeds the above limits for variables of type float or double.
|
Additional reference words: 1.00 1.50 2.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |