Changeset 771 in dev
- Timestamp:
- Aug 2, 2009, 10:29:43 PM (15 years ago)
- Location:
- trunk/ab5.0/abdev/abdev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/DrawBuffer.cpp
r681 r771 23 23 public: 24 24 HDC memdc; 25 CDrawReserve(int WndNum,HDC _hDC,int cx,int cy,int ctrl_tab_space,int nMaxOnePageChar,int linenum_textcount ){25 CDrawReserve(int WndNum,HDC _hDC,int cx,int cy,int ctrl_tab_space,int nMaxOnePageChar,int linenum_textcount,BOOL isRemoteSession){ 26 26 m_WndNum=WndNum; 27 27 x=-1; 28 28 y=-1; 29 29 bNowUnder=0; 30 hdc=_hDC;31 30 ClientSize.cx=cx; 32 31 ClientSize.cy=cy; … … 35 34 iMax_OneLine_TextLength=cx/font_width+1; 36 35 iLineNumberTextCount=linenum_textcount; 37 memdc=CreateCompatibleDC(hdc); 38 hMemBmp=CreateCompatibleBitmap(hdc,cx,cy); 39 hOldBitmap=(HBITMAP)SelectObject(memdc,hMemBmp); 36 if(isRemoteSession){ 37 hdc=0; 38 memdc=_hDC; 39 } 40 else{ 41 hdc=_hDC; 42 memdc=CreateCompatibleDC(hdc); 43 hMemBmp=CreateCompatibleBitmap(hdc,cx,cy); 44 hOldBitmap=(HBITMAP)SelectObject(memdc,hMemBmp); 45 } 40 46 41 47 //背景色でメモリ画面を初期化 … … 43 49 hBrush=CreateSolidBrush(tci.rgbBackground); 44 50 hOldBrush=(HBRUSH)SelectObject(memdc,hBrush); 45 PatBlt(memdc, 0,0,cx,cy,PATCOPY);51 PatBlt(memdc,ctrl_tab_space,0,cx-ctrl_tab_space,cy,PATCOPY); 46 52 DeleteObject(hBrush); 47 53 … … 69 75 } 70 76 ~CDrawReserve(){ 71 SelectObject(memdc,hOldBitmap);72 DeleteObject(hMemBmp);73 74 77 SelectObject(memdc,hOldFont); 75 76 DeleteDC(memdc); 77 78 if(hdc){ 79 SelectObject(memdc,hOldBitmap); 80 DeleteObject(hMemBmp); 81 82 DeleteDC(memdc); 83 } 78 84 HeapDefaultFree(lpszBuffer); 79 85 } … … 260 266 261 267 262 //メモリDCの内容を画面に描画 263 BitBlt(hdc,0,0,ClientSize.cx,ClientSize.cy,memdc,0,0,SRCCOPY); 268 //メモリDCを使用している場合、その内容を画面に描画 269 if (hdc){ 270 BitBlt(hdc,0,0,ClientSize.cx,ClientSize.cy,memdc,0,0,SRCCOPY); 271 } 264 272 } 265 273 }; … … 298 306 iControlTabSpace, 299 307 OnePage_CharHeight, 300 iLineNumberTextCount); 308 iLineNumberTextCount, 309 GetSystemMetrics(SM_REMOTESESSION)); 301 310 302 311 -
trunk/ab5.0/abdev/abdev/TextEditor_KeyEvent.cpp
r629 r771 488 488 int WndNum; 489 489 WndNum=GetWndNum(GetParent(hwnd)); 490 bool isSelectedBefore = MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x!=MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos.x 491 || MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y!=MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos.y; 490 492 491 493 if(nVirtualKey==VK_LEFT||nVirtualKey==VK_UP||nVirtualKey==VK_RIGHT||nVirtualKey==VK_DOWN||nVirtualKey==VK_PRIOR||nVirtualKey==VK_NEXT){ … … 665 667 ResetState_EditMenu(); 666 668 667 //再描画(選択時の反転表示が解除されたときを考慮) 668 UpdateWindow(hwnd); //ちらつき防止 669 InvalidateRect(hwnd,NULL,0); 669 if(!TextEdit_ScrollCaret(WndNum,0)&&isSelectedBefore){ 670 UpdateWindow(hwnd); //ちらつき防止 671 //再描画(選択時の反転表示が解除されたときを考慮) 672 InvalidateRect(hwnd,NULL,0); 673 } 670 674 } 671 675 else if(nVirtualKey==VK_HOME||nVirtualKey==VK_END){ … … 705 709 } 706 710 707 if(!TextEdit_ScrollCaret(WndNum,0) ){711 if(!TextEdit_ScrollCaret(WndNum,0)&&isSelectedBefore){ 708 712 //再描画(選択時の反転表示が解除されたときを考慮) 709 713 InvalidateRect(hwnd,NULL,0);
Note:
See TracChangeset
for help on using the changeset viewer.