Groups | Blog | Home
all groups > visual studio .net ide > july 2006 >

visual studio .net ide : "cannot place activex controls in non-mfc dialogs" message


Frank S
7/27/2006 11:20:10 AM
I am using VS 2003 and trying to add an ActiveX control to a dialog in
an existing C++ project. When I try to place an ActiveX control from the
toolbox to the dialog, I get the "cannot place activex controls in
non-mfc dialogs" message.

If I right click the dialog, the "Insert ActiveX Control..." menu item
is disabled.

MFC is being used in the project, but obviously something is missing.

How can I correct the problem?

Thanks,

v-garych NO[at]SPAM online.microsoft.com (
7/28/2006 12:00:00 AM
Hi Franks,

Thank you posting!

[quoted text, click to view]

Based on the error message, it seem you want to add an activex control in a
non-MFC dialog. So would you tell me how do you create that dialog,? Is it
a dialog from an MFC application (MFC MDI, SDI or MFC dialog project)?

If your project is not a MFC application, but just add the MFC support in
the create project wizard. In such a scenario, that dialog would not a MFC
dialog, your project just have the essential MFC header files and libs (it
means you can use some MFC class in your project, but your application
doesn't have a MFC framework and MFC windows/dialog as its UI), it would
not have the MFC dialog by default.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Frank S
7/28/2006 9:20:50 AM
[quoted text, click to view]
Gary,

I did not create the project (and the developer that did is no longer
with the company). So, how can I determine if the project is an MFC
application (MFC MDI, SDI or MFC dialog project)? What does the IDE look
for?

Thanks,

v-garych NO[at]SPAM online.microsoft.com (
8/1/2006 3:16:24 AM
Hi Frank,

A genuine MFC application should have its corresponding MFC classes as its
frame. For a MDI/SDI project, it contains:

CprojNameApp, CprojNameDoc, CprojNameView, CprojNameMainFrame,
CprojNameChildFrame(for MDI project), CAboutDlg

For a Dialog based project: it contains:

CprojNameApp, CprojNameDlg, CAboutDlg

I suggest you can create a simple MFC project in the VS IDE for comparison.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

v-garych NO[at]SPAM online.microsoft.com (
8/3/2006 2:15:41 AM
Hi Frank,

How are the things going?

If you have any issues or concerns, please let me know. It's my pleasure to
be of assistance

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button