#include "wx/splitter.h"
#include "wx/dcmirror.h"
-#ifndef __WXMSW__
+#ifndef wxHAS_IMAGES_IN_RESOURCES
#include "../sample.xpm"
#endif
menuBar->Check(SPLIT_LIVE, true);
m_splitter = new MySplitterWindow(this);
+ // If you use non-zero gravity you must initialize the splitter with its
+ // correct initial size, otherwise it will change the sash position by a
+ // huge amount when it's resized from its initial default size to its real
+ // size when the frame lays it out. This wouldn't be necessary if default
+ // zero gravity were used (although it would do no harm neither).
+ m_splitter->SetSize(GetClientSize());
m_splitter->SetSashGravity(1.0);
#if 1