Merges from Scitech Branch (George Davison):

Added wxDisplayChangedEvent and triggering in MSW, when display mode changes
this event gets triggered. I don't know what should happen with other OS's
since I am not familiar with how they handle mode changes.

Watcome Version 11 now compiles with wide character support.

Fixed watcom warnings in
	html/htmlwin.h
	imagbmp.h
	listctrl.h
	imagbmp.cpp
	quantize.cpp
	strconv.cpp
	variant.cpp
	dirctrlg.cpp
	treectlg.cpp
	m_style.cpp
	fontenum.cpp
	listctrl.cpp
	ole\dataobj.cpp
	textctrl.cpp
	window.cpp
	xml.cpp

msw/setup.h
	with watcom version 11 it now compiles with wide character support.

xrc/xml.cpp
	fixed memory leak and compile warnings


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kendall Bennett
2002-02-07 18:46:31 +00:00
parent 952ae1e88b
commit 574c939ef1
46 changed files with 1131 additions and 633 deletions

View File

@@ -1143,7 +1143,7 @@ void wxDC::DoDrawRotatedText(const wxString& text,
#if wxUSE_PALETTE
void wxDC::SetPalette(const wxPalette& palette)
void wxDC::DoSelectPalette(bool realize)
{
#ifdef __WXMICROWIN__
if (!GetHDC()) return;
@@ -1157,31 +1157,44 @@ void wxDC::SetPalette(const wxPalette& palette)
m_oldPalette = 0;
}
m_palette = palette;
if (!m_palette.Ok())
{
// Setting a NULL colourmap is a way of restoring
// the original colourmap
if (m_oldPalette)
{
::SelectPalette(GetHdc(), (HPALETTE) m_oldPalette, FALSE);
m_oldPalette = 0;
}
return;
}
if (m_palette.Ok() && m_palette.GetHPALETTE())
{
HPALETTE oldPal = ::SelectPalette(GetHdc(), (HPALETTE) m_palette.GetHPALETTE(), FALSE);
if (!m_oldPalette)
m_oldPalette = (WXHPALETTE) oldPal;
::RealizePalette(GetHdc());
if (realize)
::RealizePalette(GetHdc());
}
}
void wxDC::SetPalette(const wxPalette& palette)
{
if (palette.Ok()) {
m_palette = palette;
DoSelectPalette(true);
}
}
void wxDC::InitializePalette()
{
if (wxDisplayDepth() <= 8) {
// look for any window or parent that has a custom palette. If any has
// one then we need to use it in drawing operations
wxWindow *win = m_canvas;
while (!win->HasCustomPalette() && win->GetParent()) win = win->GetParent();
if (win->HasCustomPalette()) {
m_palette = win->GetPalette();
m_custompalette = true;
// turn on MSW translation for this palette
DoSelectPalette();
}
else
m_custompalette = false;
}
}
#endif // wxUSE_PALETTE
void wxDC::SetFont(const wxFont& the_font)