// wxSubwindows contains all HWNDs making part of a single wx control
// ----------------------------------------------------------------------------
// wxSubwindows contains all HWNDs making part of a single wx control
// ----------------------------------------------------------------------------
}
// initialize the given window: id will be stored in wxWindowIDRef ensuring
// that it is not reused while this object exists
void Set(size_t n, HWND hwnd, wxWindowID id)
{
}
// initialize the given window: id will be stored in wxWindowIDRef ensuring
// that it is not reused while this object exists
void Set(size_t n, HWND hwnd, wxWindowID id)
{
- ::SendMessage(m_hwnds[n], WM_SETFONT, (WPARAM)hfont, 0);
+ if ( m_hwnds[n] )
+ {
+ ::SendMessage(m_hwnds[n], WM_SETFONT, (WPARAM)hfont, 0);
- // otherwise the window might not be redrawn correctly
- ::InvalidateRect(m_hwnds[n], NULL, FALSE /* don't erase bg */);
+ // otherwise the window might not be redrawn correctly
+ ::InvalidateRect(m_hwnds[n], NULL, FALSE /* don't erase bg */);
+ }