visual studeo C ++ CRL和windows窗体UI [英] visual studeo C++ CRL and windows form UI

查看:236
本文介绍了visual studeo C ++ CRL和windows窗体UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,

我在向一个空的CRL项目中添加一个ui时遇到了一个简单的问题。我创建了一个空的crl并添加了窗体UI。当我添加UI视觉工作室时,打开一个名为MyForm.h [Design]的选项卡,在选项卡中我被告知错误(HRESULT:0x8000000A)。我尝试了一些
的解决方案,比如添加这段代码:

I'm having a simple problem adding a ui to an empty CRL project. I created an empty crl and added the windows form UI. when I add the UI visual studio opens a tab called MyForm.h [Design], int the tab I'm told of an error (HRESULT: 0x8000000A). I tried a few solutions like adding this bit of code:

#include "MyForm.h"

using namespace System;
using namespace System::Windows::Forms;
[STAThead]
void main(array<String^>^ args) {
	Application::EnableVisualStyles();
	Application::SetCompatibleTextRenderingDefault(false);
	USBChat3::MyForm form;
	Application::Run(%form);
}


但它不起作用。有人可以告诉我如何使Windows窗体UI工作吗?

But it didn't work. Can someone please tell me how to get Windows Form UI to work?

推荐答案

Windows窗体设计器无法反映混合模式的EXE。尝试在设计时将MyForm使用的类型移动到类库项目。 
The Windows Forms Designer cannot reflect on mixed-mode EXEs. Try move the types used by your MyForm during design time to a class library project. 


这篇关于visual studeo C ++ CRL和windows窗体UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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