void thBarViewCtrl::UpdateView(bool bUpdate /*= true*/) { m_rcClient = GetClientRect(); m_rcBorder = GetBorderRect(); dbw.UpdateBitmapSize(m_rcClient.GetSize()); // Draw bars to off-screen bitmap. wxMemoryDC dc; dc.SelectObject(dbw.m_bmp); dc.SetPen(*wxTRANSPARENT_PEN); dc.SetBackground(wxBrush(GetBackgroundColour())); dc.Clear(); if (BeginDraw()) { Draw(dc); } m_mark = m_sel = m_mouseOverItem = -1; // update the screen dc.SelectObject(wxNullBitmap); //! why is this here? Refresh(bUpdate); //if (bUpdate) // Update(); }
void GetBorderSize(HWND hWnd, LPSIZE lpSize) { RECT diff; GetBorderRect(hWnd, &diff); if ( lpSize ) { lpSize->cx = diff.left + diff.right; lpSize->cy = diff.top + diff.bottom; } }