Ignore:
Timestamp:
Nov 27, 1999, 3:16:35 PM (26 years ago)
Author:
cbratschi
Message:

edit fixes, monitor API

File:
1 edited

Legend:

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

    r1849 r1860  
    1 /* $Id: edit.cpp,v 1.18 1999-11-26 17:06:06 cbratschi Exp $ */
     1/* $Id: edit.cpp,v 1.19 1999-11-27 14:16:34 cbratschi Exp $ */
    22/*
    33 *      Edit control
     
    2020
    2121/* CB: todo
    22   - WM_MOUSEMOVE: vert lines invalidate bug
    2322  - EN_UPDATE: send before update
    2423  - EN_CHANGE: send after update -> WM_PAINT isn't the right place
     
    3837
    3938#define BUFLIMIT_MULTI          65534   /* maximum buffer size (not including '\0')
    40                                            FIXME: BTW, new specs say 65535 (do you dare ???) */
     39                                           FIXME: BTW, Win95 specs say 65535 (do you dare ???) */
    4140#define BUFLIMIT_SINGLE         32766   /* maximum buffer size (not including '\0') */
    4241#define BUFSTART_MULTI          1024    /* starting size */
     
    10181017{
    10191018        INT line_index =  EDIT_EM_LineIndex(hwnd, es, line);
    1020 //CB: fix
     1019
    10211020        if (es->style & ES_MULTILINE)
    10221021                rc->top = es->format_rect.top + (line - es->y_offset) * es->line_height;
     
    10251024        rc->bottom = rc->top + es->line_height;
    10261025        rc->left = (scol == 0) ? es->format_rect.left : SLOWORD(EDIT_EM_PosFromChar(hwnd, es, line_index + scol, TRUE));
    1027         rc->right = (ecol == -1) ? es->format_rect.right : SLOWORD(EDIT_EM_PosFromChar(hwnd, es, line_index + ecol, TRUE));
     1026        rc->right = (ecol == -1) ? es->format_rect.right : SLOWORD(EDIT_EM_PosFromChar(hwnd, es, line_index + ecol, TRUE))+1;
    10281027}
    10291028
     
    10911090
    10921091        EDIT_GetLineRect(hwnd, es, 0, start, end, &line_rect);
     1092
     1093        //CB: fix 1 pixel vertical line bug
     1094        line_rect.left--;
     1095        line_rect.right++;
     1096
    10931097        if (IntersectRect(&rc, &line_rect, &es->format_rect))
    10941098        {
     
    11391143        if (sl == el) {
    11401144                EDIT_GetLineRect(hwnd, es, sl, sc, ec, &rcLine);
     1145
     1146                //CB: fix 1 pixel vertical line bug
     1147                rcLine.left--;
     1148                rcLine.right++;
     1149
     1150
    11411151                if (IntersectRect(&rcUpdate, &rcWnd, &rcLine))
    11421152                        InvalidateRect(hwnd, &rcUpdate, FALSE);
     
    28462856        RECT rc;
    28472857
     2858        HideCaret(hwnd);
     2859
    28482860        if (!es->bEnableState || (es->style & ES_READONLY))
    28492861                brush = (HBRUSH)EDIT_SEND_CTLCOLORSTATIC(hwnd, dc);
     
    28552867
    28562868        GetClientRect(hwnd, &rc);
    2857         IntersectClipRect(dc, rc.left, rc.top, rc.right, rc.bottom); CB:
     2869        IntersectClipRect(dc, rc.left, rc.top, rc.right, rc.bottom);
    28582870        GetClipBox(dc, &rc);
    28592871        /*
     
    28642876         */
    28652877        FillRect(dc, &rc, brush);
     2878
     2879        ShowCaret(hwnd);
     2880
    28662881        return -1;
    28672882}
Note: See TracChangeset for help on using the changeset viewer.