class MyJUCEApp : public JUCEApplication
{
public:
MyJUCEApp() {}
~MyJUCEApp() {}
void initialise (const String& commandLine)
{
myMainWindow = new MyApplicationWindow();
myMainWindow->setBounds (100, 100, 400, 500);
myMainWindow->setVisible (true);
}
void shutdown()
{
myMainWindow = nullptr;
}
const String getApplicationName()
{
return "Super JUCE-o-matic";
}
const String getApplicationVersion()
{
return "1.0";
}
private:
ScopedPointer<MyApplicationWindow> myMainWindow;
};
// this generates boilerplate code to launch our app class:
START_JUCE_APPLICATION (MyJUCEApp)
虽然简单,但包含了win32的窗口创建和消息循环。