void CStartupView::DrawStartupPage() { Gdiplus::Graphics graphics(GetDC()->m_hDC); graphics.SetSmoothingMode(Gdiplus::SmoothingModeHighSpeed); // Different regions within the tab DrawBackground(graphics); DrawTitleText(graphics); //DrawSeparator(graphics); //Draw DrawLecturnityLogo(graphics); //DrawImcLogo(graphics); //InvalidateAllButtons(TRUE); }
void CStartupView::OnDraw(CDC* pDC) { CDocument* pDoc = GetDocument(); // Get the client rect. CRect rcClient; CSize szSize = GetTotalSize(); #ifdef _DEBUG_CODE int iScrollPosV = GetScrollPos(SB_VERT); int iScrollPosH = GetScrollPos(SB_HORZ); TRACE1("\nSize.x = %d",szSize.cx); TRACE1("\nSize.y = %d",szSize.cy); TRACE1("\nScrollPosV = %d",iScrollPosV); TRACE1("\nScrollPosH = %d",iScrollPosH); #endif // Paint to a memory device context to help // eliminate screen flicker. rcClient.SetRect(0,0,szSize.cx,szSize.cy); CXTMemDC *pMemDC = new CXTMemDC(pDC, rcClient, RGB(255, 255, 255)); Gdiplus::Graphics graphics(pMemDC->GetSafeHdc()); graphics.SetSmoothingMode(Gdiplus::SmoothingModeHighQuality); // Different regions within the tab DrawBackground(graphics); DrawTitleText(graphics); //DrawSeparator(graphics); //Draw DrawLecturnityLogo(graphics); //DrawImcLogo(graphics); delete pMemDC; if(m_bToolTipShow == false) { UpdateTransparentButtons(); } }
//------------------------------------------------------------------------------------------------------- // DATE: January 10 2014 // AUTHOR: RAMZI CHENNAFI // // FUNCTION: void Main_OnPaint(HWND hwnd) // RETURNS: Nothing // DESCRIPTION: // Handles painting of the screen on WM_PAINT. // NOTES: // Calls DrawTitleText() to draw all the visible text on the screen. //------------------------------------------------------------------------------------------------------- void Main_OnPaint(HWND hwnd){ PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); DrawTitleText(hdc); EndPaint(hwnd, &ps); }