Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / August 2006

Tip: Looking for answers? Try searching our database.

"cannot place activex controls in non-mfc dialogs" message

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frank S - 27 Jul 2006 17:20 GMT
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,

Frank
Gary Chang[MSFT] - 28 Jul 2006 07:06 GMT
Hi Franks,

Thank you posting!

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

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 - 28 Jul 2006 15:20 GMT
> Hi Franks,
>
[quoted text clipped - 37 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.

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,

Frank
Gary Chang[MSFT] - 01 Aug 2006 04:16 GMT
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.
Gary Chang[MSFT] - 03 Aug 2006 03:15 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.