Changeset 2204 for trunk/src/user32/edit.cpp
- Timestamp:
- Dec 26, 1999, 6:30:20 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/edit.cpp
r2185 r2204 1 /* $Id: edit.cpp,v 1.2 4 1999-12-21 17:03:43cbratschi Exp $ */1 /* $Id: edit.cpp,v 1.25 1999-12-26 17:30:14 cbratschi Exp $ */ 2 2 /* 3 3 * Edit control … … 176 176 static void EDIT_MoveWordForward(HWND hwnd, EDITSTATE *es, BOOL extend); 177 177 static void EDIT_PaintLine(HWND hwnd, EDITSTATE *es, HDC hdc, INT line, BOOL rev); 178 static INTEDIT_PaintText(HWND hwnd, EDITSTATE *es, HDC hdc, INT x, INT y, INT line, INT col, INT count, BOOL rev);178 static VOID EDIT_PaintText(HWND hwnd, EDITSTATE *es, HDC hdc, INT x, INT y, INT line, INT col, INT count, BOOL rev); 179 179 static void EDIT_SetCaretPos(HWND hwnd, EDITSTATE *es, INT pos, BOOL after_wrap); 180 180 static void EDIT_SetRectNP(HWND hwnd, EDITSTATE *es, LPRECT lprc); … … 1633 1633 * 1634 1634 */ 1635 static INTEDIT_PaintText(HWND hwnd, EDITSTATE *es, HDC dc, INT x, INT y, INT line, INT col, INT count, BOOL rev)1635 static VOID EDIT_PaintText(HWND hwnd, EDITSTATE *es, HDC dc, INT x, INT y, INT line, INT col, INT count, BOOL rev) 1636 1636 { 1637 1637 COLORREF BkColor; 1638 1638 COLORREF TextColor; 1639 INT ret;1640 1639 INT li; 1641 1640 1642 1641 if (!count) 1643 return 0;1642 return; 1644 1643 BkColor = GetBkColor(dc); 1645 1644 TextColor = GetTextColor(dc); … … 1652 1651 if (es->style & ES_MULTILINE) 1653 1652 { 1654 ret = (INT)LOWORD(TabbedTextOutA(dc, x, y, es->text + li + col, count,1655 es->tabs_count, es->tabs, es->format_rect.left - es->x_offset));1653 TabbedTextOutA(dc, x, y, es->text + li + col, count, 1654 es->tabs_count, es->tabs, es->format_rect.left - es->x_offset); 1656 1655 } else 1657 1656 { 1658 1657 LPSTR text = EDIT_GetPasswordPointer_SL(hwnd, es); 1659 1658 POINT pt; 1660 UINT oldAlign = GetTextAlign(dc);1661 1662 MoveToEx(dc,x,y,NULL);1663 SetTextAlign(dc,(oldAlign & ~TA_NOUPDATECP) | TA_UPDATECP);1664 1659 1665 1660 TextOutA(dc,x,y,text+li+col,count); 1666 GetCurrentPositionEx(dc,&pt);1667 SetTextAlign(dc,oldAlign);1668 ret = pt.x-x;1669 1661 if (es->style & ES_PASSWORD) 1670 1662 HeapFree(es->heap, 0, text); … … 1675 1667 SetTextColor(dc, TextColor); 1676 1668 } 1677 return ret;1678 1669 } 1679 1670 … … 1715 1706 { 1716 1707 CopyRect(&es->format_rect, rc); 1717 if (es->style & WS_BORDER) { 1718 INT bw = GetSystemMetrics(SM_CXBORDER) + 1; 1719 es->format_rect.left += bw; 1720 es->format_rect.top += bw; 1721 es->format_rect.right -= bw; 1722 es->format_rect.bottom -= bw; 1708 if (es->style & WS_BORDER) 1709 { 1710 INT bw = GetSystemMetrics(SM_CXBORDER)+1,bh = GetSystemMetrics(SM_CYBORDER)+1; 1711 1712 es->format_rect.left += bw; 1713 es->format_rect.top += bh; 1714 es->format_rect.right -= bw; 1715 es->format_rect.bottom -= bh; 1723 1716 } 1724 1717 es->format_rect.left += es->left_margin; … … 2745 2738 ORDER_UINT(start, old_start); 2746 2739 ORDER_UINT(old_start, old_end); 2740 if (start == old_start && end == old_end) return; 2747 2741 if (end != old_start) 2748 2742 {
Note:
See TracChangeset
for help on using the changeset viewer.