I’m making very simple application using JUCE 1.34, I’m facing a problem. I make a window which inherit DocumentWindow. But it will stop by jassert by calling setVisible(true). Are there anything missing in my code? In Mac OS X, it works fine but the problem only happens on Windows. And when I change the base class to ResizableWindow, it works fine on Windows.
Here is my code. “CMainPain” is a component class which is built by Jucer.
[code]#include “CMainPane.h”
// CMainWindow
class CMainWindow :
// public DialogWindow
public DocumentWindow
// public ResizableWindow
{
public:
/**
Constructor.
*/
CMainWindow() :
//DialogWindow (T(“DM15Jig”), Colours::lightgrey, false)
DocumentWindow(T(“DM15Jig”), Colours::lightgrey, DocumentWindow::allButtons, true)
// ResizableWindow(T(“DM15Jig”), Colours::lightgrey, true)
{
setOpaque(true);
setContentComponent(new CMainPane);
//setMenuBar (this, commandManager);
setResizable(true, false);
centreWithSize(700, 600);
// don't want the window to take focus when the title-bar is clicked..
setWantsKeyboardFocus(false);
}
/**
Destructor
*/
virtual ~CMainWindow() { /*deleteAllChildren();*/ }
/**
Called when the close button is pressed. Just quit the application.
*/
virtual void closeButtonPressed () { JUCEApplication::quit(); }
};[/code]
Here is a initialize function in my application.
[code] virtual void initialise(const String& commandLine)
{
static ShinyLookAndFeel mLook;
LookAndFeel::setDefaultLookAndFeel(&mLook);
// just create the main window...
m_pMainWindow = new CMainWindow();
m_pMainWindow->setVisible(true);
}[/code]
Anyone please help me.
Best regards,
Masanao Hayashi