0
我使用C++尋找完整,工作如何設置文本例如,在Windows中窗體斜體格式文本框,。實例形式
所有的例子都是類似以下內容:
System::Drawing::Font comment_font =
gcnew System::Drawing::Font(m_rich_text_script->SelectionFont,
System::Drawing::FontStyle::Italic);
m_rich_text_script->SelectionFont = comment_font;
,我發現了錯誤:
error C3673: 'System::Drawing::Font' : class does not have a copy-constructor
我相信錯誤是因爲我不包括System::Drawing::Font
頭文件。
我搜索了「C++ Windows Forms italic」的web和堆棧溢出,沒有一個顯示要包含的文件名。有趣的是,MSDN網站沒有顯示#include for C++。
我在Win7平臺上的Windows CLR項目上使用Visual Studio 2010。
背景:我將方法的定義從Form1.h移到Form1.cpp和#included「Form1.hpp」。