Changeset 685


Ignore:
Timestamp:
2009/03/09 21:33:12 (3 years ago)
Author:
egtra
Message:

Cls及び初期化時の塗り潰しをExtTextOutで行うよう変更

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/basic/prompt.sbp

    r684 r685  
    244244 
    245245    'Initialize for Win9x 
    246     Dim hOldBrush = SelectObject(_PromptSys_hMemDC, GetStockObject(BLACK_BRUSH)) As HBRUSH 
    247     With _PromptSys_ScreenSize 
    248         PatBlt(_PromptSys_hMemDC, 0, 0, .cx, .cy, PATCOPY) 
    249     End With 
    250     SelectObject(_PromptSys_hMemDC, hOldBrush) 
     246    ClearGraphicsScreen() 
    251247 
    252248    Dim tm As TEXTMETRIC 
     
    531527End Function 
    532528 
     529Sub ClearGraphicsScreen() 
     530    Dim rc As RECT 
     531    With rc 
     532        .left = 0 
     533        .top = 0 
     534        .right = _PromptSys_ScreenSize.cx 
     535        .bottom = _PromptSys_ScreenSize.cy 
     536    End With 
     537    SetBkColor(_PromptSys_hMemDC, 0) 
     538    ExtTextOut(_PromptSys_hMemDC, 0, 0, ETO_OPAQUE, rc, "", 0, 0) '矩形塗り潰しはExtTextOutが速いらしい 
     539End Sub 
     540 
    533541'Prompt text command functoins 
    534542 
     
    555563    If n = 2 Or n = 3 Then 
    556564        'Clear the graphics screen 
    557         Dim hOldBrush = SelectObject(_PromptSys_hMemDC, GetStockObject(BLACK_BRUSH)) 
    558         With _PromptSys_ScreenSize 
    559             PatBlt(_PromptSys_hMemDC, 0, 0, .cx, .cy, PATCOPY) 
    560         End With 
    561         SelectObject(_PromptSys_hMemDC, hOldBrush) 
     565        ClearGraphicsScreen() 
    562566    End If 
    563567 
Note: See TracChangeset for help on using the changeset viewer.