wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window ) :
wxMSWDCImpl( owner )
{
- wxCHECK_RET( window, _T("invalid window in wxWindowDCImpl") );
+ wxCHECK_RET( window, wxT("invalid window in wxWindowDCImpl") );
m_window = window;
m_hDC = (WXHDC) ::GetWindowDC(GetHwndOf(m_window));
void wxWindowDCImpl::DoGetSize(int *width, int *height) const
{
- wxCHECK_RET( m_window, _T("wxWindowDCImpl without a window?") );
+ wxCHECK_RET( m_window, wxT("wxWindowDCImpl without a window?") );
m_window->GetSize(width, height);
}
wxClientDCImpl::wxClientDCImpl( wxDC *owner, wxWindow *window ) :
wxWindowDCImpl( owner )
{
- wxCHECK_RET( window, _T("invalid window in wxClientDCImpl") );
+ wxCHECK_RET( window, wxT("invalid window in wxClientDCImpl") );
m_window = window;
m_hDC = (WXHDC)::GetDC(GetHwndOf(window));
void wxClientDCImpl::DoGetSize(int *width, int *height) const
{
- wxCHECK_RET( m_window, _T("wxClientDCImpl without a window?") );
+ wxCHECK_RET( m_window, wxT("wxClientDCImpl without a window?") );
m_window->GetClientSize(width, height);
}
}
else // not in cache, create a new one
{
+ // see comments in src/msw/window.cpp where this is defined
+ extern bool wxDidCreatePaintDC;
+
+ wxDidCreatePaintDC = true;
+
m_hDC = (WXHDC)::BeginPaint(GetHwndOf(m_window), &g_paintStruct);
if (m_hDC)
ms_cache.Add(new wxPaintDCInfo(m_window, this));