- Timestamp:
- Dec 16, 2000, 4:42:12 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/edit.cpp
r4408 r4800 1 /* $Id: edit.cpp,v 1.4 1 2000-10-03 17:29:22sandervl Exp $ */1 /* $Id: edit.cpp,v 1.42 2000-12-16 15:42:11 sandervl Exp $ */ 2 2 /* 3 3 * Edit control … … 21 21 new in Win98, Win2k: for single line too 22 22 - 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) 23 25 - too many redraws and recalculations! 24 26 */ … … 41 43 #define BUFLIMIT_SINGLE 32766 /* maximum buffer size (not including '\0') */ 42 44 45 #ifdef __WIN32OS2__ 46 #define BUFLIMIT_SINGLE_NT 0x7FFFFFFF 47 #endif 43 48 //#define BUFLIMIT_MULTI 0xFFFFFFFE 44 49 //#define BUFLIMIT_SINGLE 0x7FFFFFFF … … 1281 1286 HLOCAL hNew32; 1282 1287 1288 #ifndef __WIN32OS2__ 1283 1289 if (size > es->buffer_limit) { 1284 1290 EDIT_NOTIFY_PARENT(hwnd, EN_MAXTEXT); 1285 1291 return FALSE; 1286 1292 } 1293 #endif 1294 1287 1295 if (size <= es->buffer_size) 1288 1296 return TRUE; 1289 1297 size = ((size / GROWLENGTH) + 1) * GROWLENGTH; 1298 1299 #ifndef __WIN32OS2__ 1290 1300 if (size > es->buffer_limit) 1291 1301 size = es->buffer_limit; 1302 #endif 1292 1303 1293 1304 //TRACE_(edit)("trying to ReAlloc to %d+1\n", size); … … 1297 1308 es->text = (char*)HeapReAlloc(es->heap, 0, es->text, size + 1); 1298 1309 if (es->text) 1310 #ifdef __WIN32OS2__ 1311 es->buffer_size = HeapSize(es->heap, 0, es->text) - 1; 1312 #else 1299 1313 es->buffer_size = MIN(HeapSize(es->heap, 0, es->text) - 1, es->buffer_limit); 1314 #endif 1300 1315 else 1301 1316 es->buffer_size = 0; … … 1305 1320 //TRACE_(edit)("Old 32 bit handle %08x, new handle %08x\n", es->hloc32, hNew32); 1306 1321 es->hloc = hNew32; 1322 #ifdef __WIN32OS2__ 1323 es->buffer_size = LocalSize(es->hloc) - 1; 1324 #else 1307 1325 es->buffer_size = MIN(LocalSize(es->hloc) - 1, es->buffer_limit); 1326 #endif 1308 1327 } 1309 1328 } … … 1975 1994 return 0; 1976 1995 } 1996 #ifdef __WIN32OS2__ 1997 newSize = LocalSize(newBuf) - 1; 1998 #else 1977 1999 newSize = MIN(LocalSize(newBuf) - 1, es->buffer_limit); 2000 #endif 1978 2001 if (!(newText = (char*)LocalLock(newBuf))) { 1979 2002 //ERR_(edit)("could not lock new 32 bit buffer\n"); … … 2669 2692 if (es->style & ES_MULTILINE) { 2670 2693 if (limit) 2694 #ifdef __WIN32OS2__ 2695 es->buffer_limit = limit; 2696 #else 2671 2697 es->buffer_limit = MIN(limit, BUFLIMIT_MULTI); 2698 #endif 2672 2699 else 2673 2700 es->buffer_limit = BUFLIMIT_MULTI; 2674 2701 } else { 2675 2702 if (limit) 2703 #ifdef __WIN32OS2__ 2704 es->buffer_limit = MIN(limit, BUFLIMIT_SINGLE_NT); 2705 #else 2676 2706 es->buffer_limit = MIN(limit, BUFLIMIT_SINGLE); 2707 #endif 2677 2708 else 2678 2709 es->buffer_limit = BUFLIMIT_SINGLE; -
trunk/src/user32/static.cpp
r4512 r4800 1 /* $Id: static.cpp,v 1.2 0 2000-10-22 10:01:34sandervl Exp $ */1 /* $Id: static.cpp,v 1.21 2000-12-16 15:42:12 sandervl Exp $ */ 2 2 /* 3 3 * Static control … … 9 9 * Corel version: 20000317 10 10 * (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 * 11 20 * 12 21 * Status: complete … … 103 112 } 104 113 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 105 118 if (!(dwStyle & (SS_CENTERIMAGE | SS_REALSIZEIMAGE))) STATIC_ResizeWindow(hwnd,dwStyle,bmp.bmWidth,bmp.bmHeight); 119 #endif 106 120 107 121 if (ii.hbmColor) DeleteObject(ii.hbmColor); … … 133 147 hOldBitmap = infoPtr->hIcon; 134 148 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 135 153 if (hBitmap && !(dwStyle & (SS_CENTERIMAGE | SS_REALSIZEIMAGE))) 154 #endif 136 155 { 137 156 BITMAP bm;
Note:
See TracChangeset
for help on using the changeset viewer.