转载出处:
http://blog.sina.com.cn/s/blog_ad0672d60101j7io.html,作者:ad_long
1,main.cpp中修改:
void initialise (const String& commandLine) override
{
// This method is where you should put your application's initialisation code..
<span style="background-color: rgb(255, 102, 102);">LookAndFeel::getDefaultLookAndFeel().setDefaultSansSerifTypefaceName(L"SimHei");//黑体字</span>
mainWindow = new MainWindow (getApplicationName());
}
2,工程属性:使用UNICODE字符集
3,使用的时候:
void MainContentComponent::buttonClicked(Button*btn)
{
if (btn==&button)
{
AlertWindow::showOkCancelBox(AlertWindow::WarningIcon,<span style="background-color: rgb(255, 102, 102);"> L"警告窗口"</span>, "what information", <span style="background-color: rgb(255, 102, 102);">L"确定"</span>, <span style="background-color: rgb(255, 102, 102);">L"取消"</span>, 0, 0);
}
}
4,结果: