Windows::Forms::TextRenderer::DrawText(gT, numTo100, sfo, Rectangle(2, 2, 12, 12), SystemColors::ControlText);
给出错误
1>error C2665: 'System::Windows::Forms::TextRenderer::DrawText' : 8 个重载都不能转换所有参数类型
1> 可能是 'void System::Windows::Forms::TextRenderer::DrawText(System::Drawing::IDeviceContext ^,System::String ^,System::Drawing::Font ^,System::Drawing::点,系统::绘图::颜色)'
1> 或 'void System::Windows::Forms::TextRenderer::DrawText(System::Drawing::IDeviceContext ^,System::String ^,System::Drawing::Font ^,System::Drawing::Rectangle ,系统::绘图::颜色)'
如果我丢失了这条线,我不会出错。我已经用 Point 尝试了另一种方式,它在我的另一个项目中运行良好。任何想法将不胜感激,谢谢。
编辑 这里是相关的前几行,FWIW ..
System::Drawing::Font sfo(FontFamily::GenericSansSerif, 8.0F, FontStyle::Bold);