开发者

C++ Equivalent of Pages.Add() in Visual Studio Windows Forms

开发者 https://www.devze.com 2023-03-08 11:39 出处:网络
I am using Visual Studio 2010 and trying to make a Multi-Page Windows Forms. I need a C++/CLI equivalent of this C# code:

I am using Visual Studio 2010 and trying to make a Multi-Page Windows Forms.

I need a C++/CLI equivalent of this C# code:

public CreateUserWizard(Create开发者_开发问答UserContext context)
{
    InitializeComponent();
    Pages.Add(new WelcomePage());
    Pages.Add(new UserNamePage(context));
    Pages.Add(new PasswordPage(context));
    Pages.Add(new AdvancedPasswordOptionsPage(context));
    Pages.Add(new SummaryPage(context));
    Pages.Add(new ProgressPage(context));
    Pages.Add(new CompletePage(context));
}

This C# code was downloaded from this source: http://winformswizard.codeplex.com/. I just need to know how to write for example this code into C++/CLI:

Pages.Add(new WelcomePage());


I believe that in managed C++, you simply use the pointer-to-member operator (->) and must use gcnew in place of new, like so:

Pages->Add(gcnew WelcomePage());
0

精彩评论

暂无评论...
验证码 换一张
取 消