找不到Windows Forms Application for C ++ [英] Can't find Windows Forms Application for C++

查看:1343
本文介绍了找不到Windows Forms Application for C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很新的虚拟工作室和编程一般&我使用Visual Studio社区2015年桌面版本(从我知道)。
我从C ++类别找不到Windows窗体应用程序,但是有一个用于C#。

I'm really new to virtual studio and programming in general & I'm using Visual Studio Community 2015 Desktop Version (from what I know). I can't find a Windows Forms Application from the C++ category, while there is one for C#.

任何人都可以帮助,我需要下载另一个版本,插件或任何东西?
对不起,如果一个愚蠢的问题,我只是真的不能想出来。

Can anyone help, do I need to download another version, a plugin, or anything? Sorry if a stupid question, I just really can't figure it out!

推荐答案

在我看来,你有两个选择:

There are no C++ Windows Form templates in Visual Studio 2015. As I see it, you have two choices:


  • 在创建一个新项目时,你会看到一个在线下拉菜单中,单击并尝试搜索C ++ Windows窗体。

  • 创建一个空的C ++ CLR项目并向其中添加Windows窗体。此链接显示为这样(对发布此内容的用户的onContentStop信用):

  • When creating a new project, You will see an online dropdown, click that and try to search for "C++ Windows Forms".
  • Create an empty C++ CLR project and add a Windows Forms to it. This link puts it like this (credit to the onContentStop, the user who posted this):


  1. 创建CLR空项目。

  2. 按Ctrl-Shift-A并创建Windows窗体UI
#include "[FORM NAME].h"

using namespace System;
using namespace System::Windows::Forms;

[STAThread]//leave this as is
void main(array<String^>^ args) {
    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false);
    Application::Run(gcnew [PROJECT NAME]::[FORM NAME]);
}


  • 在解决方案资源管理器中右键单击项目, / p>


  • 在配置属性>链接器>高级下,将入口点更改为main(不带引号)。

  • Linker> System,将子系统更改为Windows(/ SUBSYSTEM / WINDOWS)。


  • 这篇关于找不到Windows Forms Application for C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆