PRB: ClassWizard Doesn't Support Custom Foreign DDX (116017)



The information in this article applies to:

  • The ClassWizard, when used with:
    • Microsoft Visual C++ 1.5
    • Microsoft Visual C++ 1.51
    • Microsoft Visual C++ 1.52
    • Microsoft Visual C++, 32-bit Learning Edition 4.0
    • Microsoft Visual C++, 32-bit Professional Edition 2.0
    • Microsoft Visual C++, 32-bit Professional Edition 2.1
    • Microsoft Visual C++, 32-bit Professional Edition 4.0

This article was previously published under Q116017

SYMPTOMS

ClassWizard does not allow custom DDX functions for foreign variables.

Custom DDX functions can be implemented by the user and then used by ClassWizard in generating code for member variables. The technique for this is described in "MFC TechNote 26."

If, however, you have created a custom DDX function that is intended to be used to exchange data between a control and a foreign member variable (see "foreign" in the online help), ClassWizard will not recognize that your function is intended for foreign variables, nor will it let you select your new property or type (defined in the "ExtraDDX?" line in the APPSTUDIO.INI file) in conjunction with a foreign variable.

CAUSE

This is a limitation in all versions listed above of Microsoft Visual C++.

RESOLUTION

To work around this, manually add your custom DDX_Field* call to your CRecordView's DoDataExchange() function.

Modification Type:MajorLast Reviewed:12/2/2003
Keywords:kbDatabase kbprb kbwizard KB116017