flagflag  
1: 2011-07-13 (Wed) 14:55:51 iseki source Cur: 2011-07-13 (Wed) 14:58:47 iseki source
Line 5: Line 5:
#br #br
*** ToolBar [#x07afc90] *** ToolBar [#x07afc90]
 ++ OnEraseBkgndEdit(CDC* pDC) でその都度画面を書き換える
 + BOOL CExToolBar::OnEraseBkgnd(CDC* pDC)
 + {
 +    // ちらつき防止
 +    ::InvalidateRect(this->m_hWnd, NULL, FALSE);
 +    ::UpdateWindow(this->m_hWnd);
 + 
 +    return CToolBar::OnEraseBkgnd(pDC);
 + }
 +#br
 +*** ダブルバッファ [#f5b727af]
 +- 例
 +    // 画面の大きさ
 +    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   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)

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMar 2026Next 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

180 user(s) are online (7 user(s) are browsing xpwiki)

Members: 0
Guests: 180

more...

Access Counter

Today : 3560035600356003560035600
Yesterday : 3997139971399713997139971
Total : 5032252450322524503225245032252450322524503225245032252450322524
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com