Some DC and Statusbar fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -370,9 +370,39 @@ void wxDC::SetPalette(const wxPalette& palette)
|
||||
// TODO
|
||||
}
|
||||
|
||||
void wxDC::SetFont(const wxFont& font)
|
||||
void wxDC::SetFont(
|
||||
const wxFont& rFont
|
||||
)
|
||||
{
|
||||
// TODO
|
||||
//
|
||||
// Set the old object temporarily, in case the assignment deletes an object
|
||||
// that's not yet selected out.
|
||||
//
|
||||
if (m_hOldFont)
|
||||
{
|
||||
// ::SelectObject(GetHdc(), (HFONT) m_hOldFont);
|
||||
m_hOldFont = 0;
|
||||
}
|
||||
|
||||
m_font = rFont;
|
||||
|
||||
if (!rFont.Ok())
|
||||
{
|
||||
if (m_hOldFont)
|
||||
// ::SelectObject(GetHdc(), (HFONT) m_hOldFont);
|
||||
m_hOldFont = 0;
|
||||
}
|
||||
|
||||
if (m_font.Ok() && m_font.GetResourceHandle())
|
||||
{
|
||||
HFONT hFont = (HFONT)0; //::SelectObject(GetHdc(), (HFONT) m_font.GetResourceHandle());
|
||||
if (hFont == (HFONT) NULL)
|
||||
{
|
||||
wxLogDebug(wxT("::SelectObject failed in wxDC::SetFont."));
|
||||
}
|
||||
if (!m_hOldFont)
|
||||
m_hOldFont = (WXHFONT) hFont;
|
||||
}
|
||||
}
|
||||
|
||||
void wxDC::SetPen(const wxPen& pen)
|
||||
|
@@ -490,7 +490,7 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
|
||||
vError = ::WinGetLastError(vHabmain);
|
||||
sError = wxPMErrorToStr(vError);
|
||||
wxLogError("Error setting parent for statusbar. Error: %s\n", sError);
|
||||
// return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user