https://blog.csdn.net/u012442719/article/details/50708145

1,main.cpp中修改:

  1. void initialise (const String& commandLine) override  
  2. {  
  3.     // This method is where you should put your application's initialisation code..  
  4. ;span style="background-color: rgb(255, 102, 102);">LookAndFeel::getDefaultLookAndFeel().setDefaultSansSerifTypefaceName(L"SimHei");//黑体字</span>  
  5.     mainWindow = new MainWindow (getApplicationName());  

2,工程属性:使用UNICODE字符集

juce教程005-中文显示

3,使用的时候:

  1. void MainContentComponent::buttonClicked(Button*btn)  
  2. {  
  3.     if (btn==&button)  
  4.     {  
  5.         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);  
  6.     }  
  7. }
  8. 4,结果:
juce教程005-中文显示





相关文章:

  • 2021-08-14
  • 2021-04-13
  • 2021-12-04
  • 2022-02-07
  • 2021-09-16
  • 2021-05-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-03-03
  • 2021-11-30
  • 2022-02-10
  • 2022-12-23
  • 2021-09-19
  • 2021-04-27
相关资源
相似解决方案