Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

(Visual C++ 6.0) Errors opening new form

Posted on 2008-10-04
8
Medium Priority
?
527 Views
Last Modified: 2013-12-03
I have a test program using a main "dialog form" and a second sub-form, accessbile via a button "OnSubForm"

I'm getting these errors on successive lines during compile.
error C2143: syntax error : missing ';' before '^'
error C2227: left of '->ShowDialog' must point to class/struct/union

#include "stdafx.h"
#include "AppParent.h"
#include "AppParentDlg.h"
#include "CustomUI.h"
void CBEParentDlg::OnSubform()
{
      // TODO: Add your control notification handler code here

      CCustomUI^ cf = gcnew CCustomUI();
      cf->ShowDialog();
}
0
Comment
Question by:MAVERICK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 22639990
VC 6 doesn't support .NET code
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 1000 total points
ID: 22639992
I suspect you want something like the following
CCustomUI* cf = new CCustomUI();
cf->Create(PUT YOUR PARAMETERS HERE);
cf->ShowWindow(SW_SHOW);

OR

CCustomUI cf;
cf.DoModal();
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 22640392
Appears to be a .net application. You can download Visual C++.net 2008 to test it.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 22640395
Visual c++.net 2008 Express Edition (free):
http://www.microsoft.com/express/vc/
0
 
LVL 1

Author Comment

by:MAVERICK
ID: 22641679
Hi

I normally program in C# these days, but for this project I intend to use VC++ 6.0, as related programs are compiled in 6.0 not .NET

Will test Andy's solution tonight.

Thanks




0
 
LVL 1

Author Comment

by:MAVERICK
ID: 22643403
Hi Andy,

Yeap, your right.

For completeness - here is the working code.

void CBEParentDlg::OnSubform()
{
      // TODO: Add your control notification handler code here

            CCustomUI* cf = new CCustomUI();
            cf->Create(IDD_CUSTOMUI_DIALOG);
            cf->ShowWindow(SW_SHOW);
}

Thanks
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 22666991
@ MAVERICK
You are expected to close questions yourself (successfully answered that is) by accepting a comment by one (or more if more than one made relevant contributions) expert as the answer.
If you do not then another expert has to take time to read the question and comments and make a recommendation.
0
 
LVL 1

Author Closing Comment

by:MAVERICK
ID: 31502998
Sorry I forgot to close the question before.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question