Cured a bad assert in wxStatusBar; #ifdefed oleutils.cpp for VC++ 5.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 1998-07-08 13:21:23 +00:00
parent c79064fbc3
commit b7346a70cf
5 changed files with 18 additions and 9 deletions

View File

@ -120,6 +120,8 @@ MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, cons
SetIcon(wxIcon("aiai.xbm"));
#endif
CreateStatusBar(1);
// Make a menubar
fileMenu = new wxMenu;
fileMenu->Append(SPLIT_VERTICAL, "Split &Vertically", "Split vertically");
@ -150,7 +152,6 @@ MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, cons
// Set this to prevent unsplitting
// splitter->SetMinimumPaneSize(20);
CreateStatusBar();
}
MyFrame::~MyFrame()
@ -223,8 +224,13 @@ MyCanvas::~MyCanvas()
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);
}

View File

@ -429,8 +429,8 @@ void wxSplitterWindow::DrawSash(wxDC& dc)
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);

View File

@ -70,7 +70,7 @@ wxDC::wxDC(void)
{
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;

View File

@ -41,7 +41,7 @@
#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

View File

@ -211,11 +211,14 @@ void wxStatusBar95::SetStatusText(const wxString& strText, int nField)
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;
}