projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Oh well, I'll just stuff in the rest of the Unicode changes I have made
[wxWidgets.git]
/
src
/
msw
/
dcclient.cpp
diff --git
a/src/msw/dcclient.cpp
b/src/msw/dcclient.cpp
index a7becdbf5cf7b670158dd69bde1aefee0a54e361..50fd1ad86e647a5dc506b00ed0cd587bc717b2f4 100644
(file)
--- a/
src/msw/dcclient.cpp
+++ b/
src/msw/dcclient.cpp
@@
-29,61
+29,77
@@
#include <windows.h>
#if !USE_SHARED_LIBRARY
#include <windows.h>
#if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC)
IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
-IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC)
+IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxWindowDC)
+IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC)
#endif
#endif
-wxClientDC::wxClientDC(void)
+/*
+ * wxWindowDC
+ */
+
+wxWindowDC::wxWindowDC(void)
{
m_canvas = NULL;
}
{
m_canvas = NULL;
}
-wx
ClientDC::wxClient
DC(wxWindow *the_canvas)
+wx
WindowDC::wxWindow
DC(wxWindow *the_canvas)
{
m_canvas = the_canvas;
{
m_canvas = the_canvas;
-// BeginDrawing();
- m_hDC = (WXHDC) ::GetDC((HWND) the_canvas->GetHWND());
+// m_hDC = (WXHDC) ::GetDCEx((HWND) the_canvas->GetHWND(), NULL, DCX_WINDOW);
+ m_hDC = (WXHDC) ::GetWindowDC((HWND) the_canvas->GetHWND() );
+ m_hDCCount ++;
+
+ SetBackground(wxBrush(m_canvas->GetBackgroundColour(), wxSOLID));
}
}
-wx
ClientDC::~wxClient
DC(void)
+wx
WindowDC::~wxWindow
DC(void)
{
{
-// EndDrawing();
-
- if (m_canvas && (HDC) m_hDC)
+ if (m_canvas && m_hDC)
{
SelectOldObjects(m_hDC);
::ReleaseDC((HWND) m_canvas->GetHWND(), (HDC) m_hDC);
m_hDC = 0;
}
{
SelectOldObjects(m_hDC);
::ReleaseDC((HWND) m_canvas->GetHWND(), (HDC) m_hDC);
m_hDC = 0;
}
+ m_hDCCount --;
}
}
-wxWindowDC::wxWindowDC(void)
+/*
+ * wxClientDC
+ */
+
+wxClientDC::wxClientDC(void)
{
m_canvas = NULL;
}
{
m_canvas = NULL;
}
-wx
WindowDC::wxWindow
DC(wxWindow *the_canvas)
+wx
ClientDC::wxClient
DC(wxWindow *the_canvas)
{
m_canvas = the_canvas;
{
m_canvas = the_canvas;
-// m_hDC = (WXHDC) ::GetDCEx((HWND) the_canvas->GetHWND(), NULL, DCX_WINDOW);
- m_hDC = (WXHDC) ::GetWindowDC((HWND) the_canvas->GetHWND() );
- m_hDCCount ++;
+// BeginDrawing();
+ m_hDC = (WXHDC) ::GetDC((HWND) the_canvas->GetHWND());
+
+ SetBackground(wxBrush(m_canvas->GetBackgroundColour(), wxSOLID));
}
}
-wx
WindowDC::~wxWindow
DC(void)
+wx
ClientDC::~wxClient
DC(void)
{
{
- if (m_canvas && m_hDC)
+// EndDrawing();
+
+ if (m_canvas && (HDC) m_hDC)
{
SelectOldObjects(m_hDC);
::ReleaseDC((HWND) m_canvas->GetHWND(), (HDC) m_hDC);
m_hDC = 0;
}
{
SelectOldObjects(m_hDC);
::ReleaseDC((HWND) m_canvas->GetHWND(), (HDC) m_hDC);
m_hDC = 0;
}
- m_hDCCount --;
}
}
+/*
+ * wxPaintDC
+ */
+
wxPaintDC::wxPaintDC(void)
{
m_canvas = NULL;
wxPaintDC::wxPaintDC(void)
{
m_canvas = NULL;
@@
-116,6
+132,8
@@
wxPaintDC::wxPaintDC(wxWindow *canvas)
ms_PaintCount = 1;
m_hDCCount++;
}
ms_PaintCount = 1;
m_hDCCount++;
}
+
+ SetBackground(wxBrush(m_canvas->GetBackgroundColour(), wxSOLID));
}
wxPaintDC::~wxPaintDC()
}
wxPaintDC::~wxPaintDC()
@@
-124,8
+142,8
@@
wxPaintDC::~wxPaintDC()
if ( !--ms_PaintCount ) {
::EndPaint((HWND)m_canvas->GetHWND(), &g_paintStruct);
m_hDCCount--;
if ( !--ms_PaintCount ) {
::EndPaint((HWND)m_canvas->GetHWND(), &g_paintStruct);
m_hDCCount--;
- m_hDC = NULL;
- ms_PaintHDC = NULL;
+ m_hDC =
(WXHDC)
NULL;
+ ms_PaintHDC =
(WXHDC)
NULL;
}
else { }//: ms_PaintHDC still in use
}
}
else { }//: ms_PaintHDC still in use
}