Changeset 4800 for trunk/src


Ignore:
Timestamp:
Dec 16, 2000, 4:42:12 PM (25 years ago)
Author:
sandervl
Message:

edit + static control fixes

Location:
trunk/src/user32
Files:
2 edited

Legend:

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

    r4408 r4800  
    1 /* $Id: edit.cpp,v 1.41 2000-10-03 17:29:22 sandervl Exp $ */
     1/* $Id: edit.cpp,v 1.42 2000-12-16 15:42:11 sandervl Exp $ */
    22/*
    33 *      Edit control
     
    2121    new in Win98, Win2k: for single line too
    2222  - WinNT/Win2k: higher size limits (single: 0x7FFFFFFE, multi: none)
     23    SvL: Limits removed. EM_SETTEXTLIMIT has no effect in NT4, SP6 (EM_GETTEXTLIMIT
     24         only returns that value); limits are simply ignored, no EN_MAXTEXT is ever sent)
    2325  - too many redraws and recalculations!
    2426*/
     
    4143#define BUFLIMIT_SINGLE         32766   /* maximum buffer size (not including '\0') */
    4244
     45#ifdef __WIN32OS2__
     46#define BUFLIMIT_SINGLE_NT      0x7FFFFFFF
     47#endif
    4348//#define BUFLIMIT_MULTI  0xFFFFFFFE
    4449//#define BUFLIMIT_SINGLE 0x7FFFFFFF
     
    12811286        HLOCAL hNew32;
    12821287
     1288#ifndef __WIN32OS2__
    12831289        if (size > es->buffer_limit) {
    12841290                EDIT_NOTIFY_PARENT(hwnd, EN_MAXTEXT);
    12851291                return FALSE;
    12861292        }
     1293#endif
     1294
    12871295        if (size <= es->buffer_size)
    12881296                return TRUE;
    12891297        size = ((size / GROWLENGTH) + 1) * GROWLENGTH;
     1298
     1299#ifndef __WIN32OS2__
    12901300        if (size > es->buffer_limit)
    12911301                size = es->buffer_limit;
     1302#endif
    12921303
    12931304        //TRACE_(edit)("trying to ReAlloc to %d+1\n", size);
     
    12971308                es->text = (char*)HeapReAlloc(es->heap, 0, es->text, size + 1);
    12981309                if (es->text)
     1310#ifdef __WIN32OS2__
     1311                        es->buffer_size = HeapSize(es->heap, 0, es->text) - 1;
     1312#else
    12991313                        es->buffer_size = MIN(HeapSize(es->heap, 0, es->text) - 1, es->buffer_limit);
     1314#endif
    13001315                else
    13011316                        es->buffer_size = 0;
     
    13051320                        //TRACE_(edit)("Old 32 bit handle %08x, new handle %08x\n", es->hloc32, hNew32);
    13061321                        es->hloc = hNew32;
     1322#ifdef __WIN32OS2__
     1323                        es->buffer_size = LocalSize(es->hloc) - 1;
     1324#else
    13071325                        es->buffer_size = MIN(LocalSize(es->hloc) - 1, es->buffer_limit);
     1326#endif
    13081327                }
    13091328        }
     
    19751994                return 0;
    19761995        }
     1996#ifdef __WIN32OS2__
     1997        newSize = LocalSize(newBuf) - 1;
     1998#else
    19771999        newSize = MIN(LocalSize(newBuf) - 1, es->buffer_limit);
     2000#endif
    19782001        if (!(newText = (char*)LocalLock(newBuf))) {
    19792002                //ERR_(edit)("could not lock new 32 bit buffer\n");
     
    26692692        if (es->style & ES_MULTILINE) {
    26702693                if (limit)
     2694#ifdef __WIN32OS2__
     2695                        es->buffer_limit = limit;
     2696#else
    26712697                        es->buffer_limit = MIN(limit, BUFLIMIT_MULTI);
     2698#endif
    26722699                else
    26732700                        es->buffer_limit = BUFLIMIT_MULTI;
    26742701        } else {
    26752702                if (limit)
     2703#ifdef __WIN32OS2__
     2704                        es->buffer_limit = MIN(limit, BUFLIMIT_SINGLE_NT);
     2705#else
    26762706                        es->buffer_limit = MIN(limit, BUFLIMIT_SINGLE);
     2707#endif
    26772708                else
    26782709                        es->buffer_limit = BUFLIMIT_SINGLE;
  • trunk/src/user32/static.cpp

    r4512 r4800  
    1 /* $Id: static.cpp,v 1.20 2000-10-22 10:01:34 sandervl Exp $ */
     1/* $Id: static.cpp,v 1.21 2000-12-16 15:42:12 sandervl Exp $ */
    22/*
    33 * Static control
     
    99 * Corel version: 20000317
    1010 * (WINE version: 990923)
     11 *
     12 * SvL:
     13 * SS_REALSIZEIMAGE is supposed to prevent control resizing, but that doesn't
     14 * appear to happen in NT (although the SDK docs are very clear about this)
     15 * Need to figure out why. (not resizing messes up the bitmap control in
     16 * the Microsoft Visual C++ 4.2 install program)
     17 * Same thing happens with a very simply test app, so the installer
     18 * does nothing special.
     19 *
    1120 *
    1221 * Status:  complete
     
    103112    }
    104113
     114#if 1
     115    //SvL: Breaks MS Visual C++ install dialogs with static controls (no resize)
     116    if (!(dwStyle & (SS_CENTERIMAGE))) STATIC_ResizeWindow(hwnd,dwStyle,bmp.bmWidth,bmp.bmHeight);
     117#else
    105118    if (!(dwStyle & (SS_CENTERIMAGE | SS_REALSIZEIMAGE))) STATIC_ResizeWindow(hwnd,dwStyle,bmp.bmWidth,bmp.bmHeight);
     119#endif
    106120
    107121    if (ii.hbmColor) DeleteObject(ii.hbmColor);
     
    133147    hOldBitmap = infoPtr->hIcon;
    134148    infoPtr->hIcon = hBitmap;
     149#if 1
     150    //SvL: Breaks MS Visual C++ install dialogs with static controls (no resize)
     151    if (hBitmap && !(dwStyle & (SS_CENTERIMAGE)))
     152#else
    135153    if (hBitmap && !(dwStyle & (SS_CENTERIMAGE | SS_REALSIZEIMAGE)))
     154#endif
    136155    {
    137156      BITMAP bm;
Note: See TracChangeset for help on using the changeset viewer.