ourfor / blog

利用GitHub的Issues记录
https://github.com/ourfor/blog/issues
1 stars 0 forks source link

Visual C++笔记 #17

Open ourfor opened 5 years ago

ourfor commented 5 years ago
ourfor commented 5 years ago

还是熟悉的函数名:

MessageBox::Show("Nicet to meet you!");

它在VB.Net里面是这样的:

MessageBox.Show("Nicet to meet you!");

哈哈😄 创建Windows窗体的模板:

// form.cpp: 主项目文件。

#include "stdafx.h"
#include "Form1.h"

//使用Form1.h里面声明的名称空间
using namespace form;

[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
    // 在创建任何控件之前启用 Windows XP 可视化效果
    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false); 

    // 创建主窗口并运行它
    Application::Run(gcnew Form1());
    return 0;
}