Ignore:
Timestamp:
Aug 15, 1999, 9:11:02 PM (26 years ago)
Author:
cbratschi
Message:

wine-990731 update

File:
1 edited

Legend:

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

    r394 r500  
    1 /* $Id: edit.cpp,v 1.2 1999-07-25 16:31:44 cbratschi Exp $ */
     1/* $Id: edit.cpp,v 1.3 1999-08-15 19:11:00 cbratschi Exp $ */
    22/*
    33 *      Edit control
     
    1717 */
    1818
    19 //#include "config.h"
    2019#include "winuser.h"
    2120#include "winbase.h"
    2221#include <string.h>
    23 //#include "winnt.h"
    24 //#include "win.h"
    25 //#include "wine/winbase16.h"
    2622#include "controls.h"
    2723#include "combo.h"
    28 //#include "local.h"
    29 //#include "resource.h"
    30 //#include "debugtools.h"
    31 //#include "callback.h"
    32 //#include "tweak.h"
    3324
    3425#define BUFLIMIT_MULTI          65534   /* maximum buffer size (not including '\0')
     
    9889        INT line_count;         /* number of lines */
    9990        INT y_offset;                   /* scroll offset in number of lines */
     91        BOOL bCaptureState; /* flag indicating whether mouse was captured */
    10092        /*
    10193         *      only for multi line controls
     
    31563148                return 0;
    31573149
     3150        es->bCaptureState = TRUE;
    31583151        SetCapture(hwnd);
    31593152        EDIT_ConfinePoint(hwnd, es, &x, &y);
     
    31743167static LRESULT EDIT_WM_LButtonUp(HWND hwnd, EDITSTATE *es, DWORD keys, INT x, INT y)
    31753168{
    3176         if (GetCapture() == hwnd) {
    3177                 KillTimer(hwnd, 0);
    3178                 ReleaseCapture();
    3179         }
    3180         return 0;
     3169        if (es->bCaptureState && GetCapture() == hwnd) {
     3170                KillTimer(hwnd, 0);
     3171                ReleaseCapture();
     3172        }
     3173        es->bCaptureState = FALSE;
     3174
     3175        return 0;
    31813176}
    31823177
     
    32333228        es->style = cs->style;
    32343229
    3235         if ((es->style & WS_BORDER) && !(es->style & WS_DLGFRAME))
    3236                 SetWindowLongA(hwnd,GWL_STYLE,GetWindowLongA(hwnd,GWL_STYLE) & ~WS_BORDER);
    3237 
     3230
     3231        /*
     3232         * In Win95 look and feel, the WS_BORDER style is replaced by the
     3233         * WS_EX_CLIENTEDGE style for the edit control. This gives the edit
     3234         * control a non client area.
     3235         */
     3236        if (es->style & WS_BORDER)
     3237        {
     3238          es->style      &= ~WS_BORDER;
     3239          SetWindowLongA(hwnd,GWL_STYLE,GetWindowLongA(hwnd,GWL_STYLE) & ~WS_BORDER);
     3240          SetWindowLongA(hwnd,GWL_EXSTYLE,GetWindowLongA(hwnd,GWL_EXSTYLE) | WS_EX_CLIENTEDGE);
     3241        }
     3242       
    32383243        if (es->style & ES_MULTILINE) {
    32393244                es->buffer_size = BUFSTART_MULTI;
     
    33163321                        if(es->style & WS_VSCROLL) rc.right++;
    33173322                }
    3318                 DrawEdge(dc, &rc, EDGE_SUNKEN, BF_RECT);
     3323                Rectangle(dc, rc.left, rc.top, rc.right, rc.bottom);
    33193324        }
    33203325        IntersectClipRect(dc, es->format_rect.left,
Note: See TracChangeset for help on using the changeset viewer.