(CLR) C++/CLI include header in form file?

I have a simple form in C++/cli (CLR) and in the file (.h extension, in this case MyForm.h) where MyForm is defined I want to include a header file from "Header Files". However, when I try to include it wherever in the file and attempt to compile it, it returns over 100 errors while building from files that I did not even add(like wingdi.h). Here's an example

#pragma endregion
#include "headerfile.h" //The header I want to include
private: System::Void label1_Click(System::Object^  sender, System::EventArgs^  e) {
    System::Windows::Forms::Application::Exit();
}
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {

}
private: System::Void MyForm_Load(System::Object^  sender, 
System::EventArgs^  e) {
}
};
}

This code is where button click functions ar defined in MyForm.h

链接地址: http://www.djcxy.com/p/59620.html

上一篇: 原生C ++ CLI未解析符号

下一篇: (CLR)C ++ / CLI在表单文件中包含头文件?