SetIcon(wxIcon("aiai.xbm"));
#endif
+ CreateStatusBar(1);
+
// Make a menubar
fileMenu = new wxMenu;
fileMenu->Append(SPLIT_VERTICAL, "Split &Vertically", "Split vertically");
// Set this to prevent unsplitting
// splitter->SetMinimumPaneSize(20);
- CreateStatusBar();
}
MyFrame::~MyFrame()
void MyCanvas::OnDraw(wxDC& dc)
{
+ dc.SetPen(*wxBLACK_PEN);
dc.DrawLine(0, 0, 100, 100);
dc.SetBackgroundMode(wxTRANSPARENT);
dc.DrawText("Testing", 50, 50);
+
+ dc.SetPen(*wxRED_PEN);
+ dc.SetBrush(*wxGREEN_BRUSH);
+ dc.DrawRectangle(120, 120, 100, 80);
}
dc.DrawLine(m_sashPosition+m_sashSize-2, 1, m_sashPosition+m_sashSize-2, h-1);
dc.SetPen(*m_darkShadowPen);
- dc.DrawLine(m_sashPosition+m_sashSize-1, 2, m_sashPosition+m_sashSize-1, h-2);
- }
+ dc.DrawLine(m_sashPosition+m_sashSize-1, 2, m_sashPosition+m_sashSize-1, h-2);
+ }
else
{
dc.SetPen(*m_facePen);
{
m_minX = 0; m_minY = 0; m_maxX = 0; m_maxY = 0;
m_clipping = FALSE;
- m_autoSetting = TRUE ;
+ m_autoSetting = FALSE ;
m_filename = "";
m_canvas = NULL;
#include <wx/msw/ole/uuid.h>
#include <wx/msw/ole/oleutils.h>
-#ifndef __BORLANDC__
+#if defined(_MSC_VER) && (_MSC_VER > 1000)
#include <docobj.h>
#endif
wxString wxStatusBar95::GetStatusText(int nField) const
{
- wxASSERT( (nField > 0) && (nField < m_nFields) );
+ wxASSERT( (nField > -1) && (nField < m_nFields) );
- wxString str;
- StatusBar_GetText(hwnd, nField,
- str.GetWriteBuf(StatusBar_GetTextLen(hwnd, nField)));
+ wxString str("");
+ int len = StatusBar_GetTextLen(hwnd, nField);
+ if (len > 0)
+ {
+ StatusBar_GetText(hwnd, nField, str.GetWriteBuf(len));
+ }
return str;
}