Exemple #1
0
void COptionsAbout::OnPaint() 
{
	CPaintDC dc(this); // device context for painting

	DrawAbout(dc.m_hDC);
	
	// Do not call CDialog::OnPaint() for painting messages
}
Exemple #2
0
void OnPaintAbout(HWND hwnd)
{
    PAINTSTRUCT ps;
    RECT rc;
    HDC hdc = BeginPaint(hwnd, &ps);
    UpdateAboutLayoutInfo(hwnd, hdc, &rc);
    DrawAbout(hwnd, hdc, &rc);
    EndPaint(hwnd, &ps);
}
Exemple #3
0
static void OnPaintAbout(HWND hwnd)
{
    PAINTSTRUCT ps;
    RectI rc;
    HDC hdc = BeginPaint(hwnd, &ps);
    UpdateAboutLayoutInfo(hwnd, hdc, &rc);
    DrawAbout(hwnd, hdc, rc, gLinkInfo);
    EndPaint(hwnd, &ps);
}
Exemple #4
0
void DrawAboutPage(WindowInfo& win, HDC hdc)
{
    ClientRect rc(win.hwndCanvas);
    UpdateAboutLayoutInfo(win.hwndCanvas, hdc, &rc);
    DrawAbout(win.hwndCanvas, hdc, rc, win.staticLinks);
    if (HasPermission(Perm_SavePreferences | Perm_DiskAccess) && gGlobalPrefs.rememberOpenedFiles) {
        RectI rect = DrawBottomRightLink(win.hwndCanvas, hdc, _TR("Show frequently read"));
        win.staticLinks.Append(StaticLinkInfo(rect, SLINK_LIST_SHOW));
    }
}
Exemple #5
0
void DoPaint(HDC hdc)
{
	const char szInstructions[] = "Please touch the center of the target.";

	POINT p;
	int i, n;
	int old_rop;
	POINT last = current_target_location;
	HPEN hOldPen;
	
	if (current_target == total_targets) {
		RECT r = {10, yext/2,  xext - 10, yext/2 + 40};
		DrawDone(hdc, r);
		return;
	}
	
	if (current_target == 0)
	{
		RECT r = {10, yext - 85, xext - 10, yext - 10};
		DrawAbout(hdc, r);
	}

	current_target_location = GetTarget(current_target);

	old_rop = SetROP2(hdc, R2_XORPEN);
	hOldPen = SelectObject(hdc, GetStockObject(WHITE_PEN));

	n = 20;
	for (i=0; i < n; i++)
	{
		p.x = last.x + ((current_target_location.x - last.x) * i / n);
		p.y = last.y + ((current_target_location.y - last.y) * i / n);
		DrawTarget(hdc, p);
		Sleep(60);
		DrawTarget(hdc, p);
	}

	// final position
	SetROP2(hdc, R2_COPYPEN);
	SelectObject(hdc, GetStockObject(BLACK_PEN));

	DrawTarget(hdc, current_target_location);
	DrawLabel(hdc, current_target_location, szInstructions);

	// put things back
	SetROP2(hdc, old_rop);
	SelectObject(hdc, hOldPen);
}
void Menu::Draw(const sf::Event& ev){
	ChangeRoom(ev);
	if (ev.type == sf::Event::Resized){
		RepositionButtons();
		ResizeBackgrounds();
	}
	switch (mCurrentRoom){
	case MainMenu:{
		DrawMainMenu(ev);
		break;
	}
	case Library:{
		DrawLibrary(ev);
		break;
	}
	case About:{
		DrawAbout(ev);
		break;
	}
	}
};
Exemple #7
0
void COptionsAbout::OnMouseMove(UINT nFlags, CPoint point) 
{

	RECT rcRegisterIt = { 29, 181, 29+306, 181+34 },
		rcMail = { 51,130, 51+180, 130+30 },
		rcWWW = { 50,151, 50+180, 151+30 };


	RECT rc; GetWindowRect( &rc );
	int x = (RECTW(rc)-pimgAbout->w)/2, 
		 y = (RECTH(rc)-pimgAbout->h)/2;

	OffsetRect( &rcRegisterIt, x, y );
	OffsetRect( &rcMail, x, y );
	OffsetRect( &rcWWW, x, y );

	HDC hDC = ::GetDC( m_hWnd );

	HDC hDCSrc = CreateCompatibleDC( hDC );


	RECT *prc = NULL;
	cGImage *pimg = NULL;

	if ( PtInRect( &rcRegisterIt, point) )
	{
		if ( iLast!=1 ) {
			prc = &rcRegisterIt;
			pimg = pimgAboutRegisterIt;
			iLast = 1;
		}
	}
	else if ( PtInRect( &rcMail, point) )
	{
		if ( iLast!=2 ) {
			prc = &rcMail;
			pimg = pimgAboutMail;
			iLast = 2;
		}
	}
	else if ( PtInRect( &rcWWW, point) )
	{
		if ( iLast!=3 ) {
			prc = &rcWWW;
			pimg = pimgAboutWWW;
			iLast = 3;
		}
	}
	else if ( iLast )
	{
		DrawAbout( hDC );
		SetCursor( AfxGetApp()->LoadStandardCursor( MAKEINTRESOURCE(IDC_ARROW) ) );

		iLast = 0;
	}

	if ( prc && pimg && iLast) 
	{
		DrawAbout( NULL );

		SelectObject( hDCSrc, pimg->hBitmap );
		::BitBlt( hDC, prc->left, prc->top,
			RECTW((*prc)), RECTH((*prc)),
			hDCSrc, 0,0, SRCCOPY );
		SetCursor( AfxGetApp()->LoadStandardCursor( 
			MAKEINTRESOURCE(IDC_HAND) ) );

	}

	::DeleteDC( hDCSrc );
	::ReleaseDC( m_hWnd, hDC );
	
	CDialog::OnMouseMove(nFlags, point);
}