Ignore:
Timestamp:
Feb 23, 2000, 6:05:19 PM (26 years ago)
Author:
cbratschi
Message:

export 55AA pattern for COMCTL32, edit EN_CHANGED fix

File:
1 edited

Legend:

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

    r2852 r2873  
    1 /* $Id: edit.cpp,v 1.35 2000-02-21 17:25:26 cbratschi Exp $ */
     1/* $Id: edit.cpp,v 1.36 2000-02-23 17:05:16 cbratschi Exp $ */
    22/*
    33 *      Edit control
     
    291291{
    292292        EDIT_EM_ReplaceSel(hwnd, es, TRUE, "");
    293         if (es->flags & EF_UPDATE) {
    294                 es->flags &= ~EF_UPDATE;
    295                 EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
     293        if (es->flags & EF_UPDATE) {
     294                es->flags &= ~EF_UPDATE;
     295                EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
    296296        }
    297297}
     
    28832883        //                es->undo_insert_count, es->undo_text);
    28842884
    2885         if (es->flags & EF_UPDATE) {
    2886                 es->flags &= ~EF_UPDATE;
    2887                 EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
    2888         }
     2885        if (es->flags & EF_UPDATE) {
     2886                es->flags &= ~EF_UPDATE;
     2887                EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
     2888        }
    28892889
    28902890        return TRUE;
     
    29322932                        {
    29332933                                EDIT_EM_ReplaceSel(hwnd, es, TRUE, "\r\n");
    2934                                 if (es->flags & EF_UPDATE) {
    2935                                         es->flags &= ~EF_UPDATE;
    2936                                         EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
     2934                                if (es->flags & EF_UPDATE) {
     2935                                        es->flags &= ~EF_UPDATE;
     2936                                        EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
    29372937                                }
    29382938                        }
     
    29432943                {
    29442944                        EDIT_EM_ReplaceSel(hwnd, es, TRUE, "\t");
    2945                         if (es->flags & EF_UPDATE) {
    2946                                 es->flags &= ~EF_UPDATE;
    2947                                 EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
    2948                         }
     2945                        if (es->flags & EF_UPDATE) {
     2946                                es->flags &= ~EF_UPDATE;
     2947                                EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
     2948                        }
    29492949                }
    29502950                break;
     
    29622962                break;
    29632963//CB: are these three keys documented or Linux style???
    2964         case 0x03: /* ^C */
    2965                 SendMessageA(hwnd, WM_COPY, 0, 0);
    2966                 break;
    2967         case 0x16: /* ^V */
    2968                 SendMessageA(hwnd, WM_PASTE, 0, 0);
    2969                 break;
    2970         case 0x18: /* ^X */
    2971                 SendMessageA(hwnd, WM_CUT, 0, 0);
    2972                 break;
     2964        case 0x03: /* ^C */
     2965                SendMessageA(hwnd, WM_COPY, 0, 0);
     2966                break;
     2967        case 0x16: /* ^V */
     2968                SendMessageA(hwnd, WM_PASTE, 0, 0);
     2969                break;
     2970        case 0x18: /* ^X */
     2971                SendMessageA(hwnd, WM_CUT, 0, 0);
     2972                break;
    29732973
    29742974        default:
     
    31263126           es->selection_start = es->selection_end = 0;
    31273127           EDIT_EM_ScrollCaret(hwnd, es);
    3128            if (es->flags & EF_UPDATE) {
    3129                 es->flags &= ~EF_UPDATE;
    3130                 EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
    3131            }
     3128           if (es->flags & EF_UPDATE) {
     3129                es->flags &= ~EF_UPDATE;
     3130                EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
     3131           }
    31323132       }
    31333133       return 0;
     
    31433143{
    31443144        if (!es) /* Protect against multiple destroy messages */
    3145             return;
     3145            return;
    31463146
    31473147        if (es->hloc) {
     
    33593359        HWND hLBox;
    33603360
    3361         /********************************************************************
    3362         * This if statement used to check to see if the parent of the
    3363         * edit control was a 'combobox' by comparing the ATOM of the parent
    3364         * to a table of internal window control ATOMs.  However, this check
    3365         * would fail if the parent was a superclassed combobox (Although
    3366         * having the same basic functionality of a combobox, it has a
    3367         * different name and ATOM, thus defeating this check.)
    3368         *
    3369         * The safe way to determine if the parent is a combobox is to send it
    3370         * a message only a combo box would understand.  I send it a message
    3371         * CB_GETCOUNT, if I get 0 then the parent is not a combobox -
     3361        /********************************************************************
     3362        * This if statement used to check to see if the parent of the
     3363        * edit control was a 'combobox' by comparing the ATOM of the parent
     3364        * to a table of internal window control ATOMs.  However, this check
     3365        * would fail if the parent was a superclassed combobox (Although
     3366        * having the same basic functionality of a combobox, it has a
     3367        * different name and ATOM, thus defeating this check.)
     3368        *
     3369        * The safe way to determine if the parent is a combobox is to send it
     3370        * a message only a combo box would understand.  I send it a message
     3371        * CB_GETCOUNT, if I get 0 then the parent is not a combobox -
    33723372         * return FALSE.  If I get > 0, then the parent IS a combobox
    33733373         * (or sub/super classed derrivative thereof)
    3374         ********************************************************************/
     3374        ********************************************************************/
    33753375#if 0 //CB: our code
    33763376        if (GetClassWord(GetParent(hwnd),GCW_ATOM) ==  GlobalFindAtomA(COMBOBOXCLASSNAME) &&
    33773377                        (hLBox = COMBO_GetLBWindow(GetParent(hwnd))))
    3378 #else   
     3378#else
    33793379        if (
    33803380             ((SendMessageA(GetParent(hwnd), CB_GETCOUNT, 0, 0)) > 0) &&
     
    38393839  if (es->flags & EF_UPDATE)
    38403840  {
    3841     es->flags &= ~EF_UPDATE;
     3841    //CB: don't reset flag or EN_CHANGE is lost!
     3842    //es->flags &= ~EF_UPDATE;
    38423843    EDIT_NOTIFY_PARENT(hwnd,EN_UPDATE);
    38433844  }
     
    39043905                GlobalUnlock(hsrc);
    39053906
    3906                 if (es->flags & EF_UPDATE) {
    3907                         es->flags &= ~EF_UPDATE;
    3908                         EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
    3909                 }
     3907                if (es->flags & EF_UPDATE) {
     3908                        es->flags &= ~EF_UPDATE;
     3909                        EDIT_NOTIFY_PARENT(hwnd, EN_CHANGE);
     3910                }
    39103911        }
    39113912        CloseClipboard();
Note: See TracChangeset for help on using the changeset viewer.