flagflag  
Page Top

View anchor.png

  1. OnEraseBkgnd(CDC* pDC) をオーバーライトして,ここで画面をクリアしないようにする.
  2. 画面の書き換えは他の場所で行う
     
Page Top

ToolBar anchor.png

  1. OnEraseBkgndEdit(CDC* pDC) でその都度画面を書き換える
    BOOL CExToolBar::OnEraseBkgnd(CDC* pDC)
    {
    	// ちらつき防止
    	::InvalidateRect(this->m_hWnd, NULL, FALSE);
    	::UpdateWindow(this->m_hWnd);
    
    	return CToolBar::OnEraseBkgnd(pDC);
    }
     
Page Top

ダブルバッファ anchor.png

  • 	// 画面の大きさ
    	RECT rect;
    	this->GetClientRect(&rect);
    
    	// 画面のデバイスコンテキスト
    	CPaintDC    dc(this);
    
    	// BitMapデータ
    	CBitmap bmp;
    	//bmp.CreateCompatibleBitmap(&dc, rect.right, rect.bottom);
    	bmp.LoadBitmap(rsrcID);
    
    	// バックバッファ用デバイスコンテキスト
    	CDC memDC;
    	memDC.CreateCompatibleDC(&dc);
    
    	// BitMapデータとバックバッファ用デバイスコンテキストを関連付ける
    	memDC.SelectObject(&bmp);
    
    	// バックバッファをフロントに転送
    	dc.BitBlt(0, 0, rect.right, rect.bottom, &memDC, 0, 0, SRCCOPY);
    	
    	// BitMapデータを開放
    	bmp.DeleteObject();

Front page   Freeze Diff Backup Copy Rename Reload   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)
Counter: 2329, today: 2, yesterday: 0
Last-modified: 2011-07-13 (Wed) 14:58:47 (JST) (4677d) by iseki

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMay 2024Next Month
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Today

Who's Online

83 user(s) are online (18 user(s) are browsing xpwiki)

Members: 0
Guests: 83

more...

Access Counter

Today : 9595959595959595
Yesterday : 7722772277227722
Total : 2344107623441076234410762344107623441076234410762344107623441076
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com