Ignore:
Timestamp:
Dec 26, 1999, 6:30:20 PM (26 years ago)
Author:
cbratschi
Message:

non-client fixes, DefWndProc enhancements, several other bugs fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/edit.cpp

    r2185 r2204  
    1 /* $Id: edit.cpp,v 1.24 1999-12-21 17:03:43 cbratschi Exp $ */
     1/* $Id: edit.cpp,v 1.25 1999-12-26 17:30:14 cbratschi Exp $ */
    22/*
    33 *      Edit control
     
    176176static void     EDIT_MoveWordForward(HWND hwnd, EDITSTATE *es, BOOL extend);
    177177static void     EDIT_PaintLine(HWND hwnd, EDITSTATE *es, HDC hdc, INT line, BOOL rev);
    178 static INT      EDIT_PaintText(HWND hwnd, EDITSTATE *es, HDC hdc, INT x, INT y, INT line, INT col, INT count, BOOL rev);
     178static VOID     EDIT_PaintText(HWND hwnd, EDITSTATE *es, HDC hdc, INT x, INT y, INT line, INT col, INT count, BOOL rev);
    179179static void     EDIT_SetCaretPos(HWND hwnd, EDITSTATE *es, INT pos, BOOL after_wrap);
    180180static void     EDIT_SetRectNP(HWND hwnd, EDITSTATE *es, LPRECT lprc);
     
    16331633 *
    16341634 */
    1635 static INT EDIT_PaintText(HWND hwnd, EDITSTATE *es, HDC dc, INT x, INT y, INT line, INT col, INT count, BOOL rev)
     1635static VOID EDIT_PaintText(HWND hwnd, EDITSTATE *es, HDC dc, INT x, INT y, INT line, INT col, INT count, BOOL rev)
    16361636{
    16371637        COLORREF BkColor;
    16381638        COLORREF TextColor;
    1639         INT ret;
    16401639        INT li;
    16411640
    16421641        if (!count)
    1643                 return 0;
     1642                return;
    16441643        BkColor = GetBkColor(dc);
    16451644        TextColor = GetTextColor(dc);
     
    16521651        if (es->style & ES_MULTILINE)
    16531652        {
    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);
    16561655        } else
    16571656        {
    16581657          LPSTR text = EDIT_GetPasswordPointer_SL(hwnd, es);
    16591658          POINT pt;
    1660           UINT oldAlign = GetTextAlign(dc);
    1661 
    1662           MoveToEx(dc,x,y,NULL);
    1663           SetTextAlign(dc,(oldAlign & ~TA_NOUPDATECP) | TA_UPDATECP);
    16641659
    16651660          TextOutA(dc,x,y,text+li+col,count);
    1666           GetCurrentPositionEx(dc,&pt);
    1667           SetTextAlign(dc,oldAlign);
    1668           ret = pt.x-x;
    16691661          if (es->style & ES_PASSWORD)
    16701662            HeapFree(es->heap, 0, text);
     
    16751667                SetTextColor(dc, TextColor);
    16761668        }
    1677         return ret;
    16781669}
    16791670
     
    17151706{
    17161707        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;
    17231716        }
    17241717        es->format_rect.left += es->left_margin;
     
    27452738        ORDER_UINT(start, old_start);
    27462739        ORDER_UINT(old_start, old_end);
     2740        if (start == old_start && end == old_end) return;
    27472741        if (end != old_start)
    27482742        {
Note: See TracChangeset for help on using the changeset viewer.