I professionally work with a rather large project and I have splitting the
'Solution' into a number of Win32 Lib projects using VS 6.0. While migrating
to .NET2003, the new Add Member Variable-Wizard can't generate dialog member
controls (stuff is grayed out). It works with MFC EXE and MFC DLL
applications (I suspect because they have CWinApp derived class), but not
with resources in Win32 MFC LIB-projects.
Is this a known problem in .NET IDE, are there any workaround ?
Right now I'm thinking about staying with VS 6.0
RobertKeith - 30 Jan 2004 22:31 GMT
The dialog that the controls are on must have been created in an older version of Visual Studio that didn't give VS .NET what it wanted. This is how to fix it:
1. Edit the header file associated with the dialog (for me, the dialog resource id was DLG_SECURITY, and the header file was Security.h).
2. Find the MFC-created section called "Dialog Data".
3. Beneath the line:
//{{AFX_DATA([Dialog Class name])
4. Add the line:
enum { IDD = [Dialog Resource ID] };
(For my case, the lines were:
//{{AFX_DATA(cSecurity)
enum { IDD = DLG_SECURITY };
)
5. Close and re-open your Solution. (I haven't tested whether this is necessary, but I bet it is).
6. VS .NET's resource editor should have "Add Variable" enabled on the speed menu now.