mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 12:23:28 +00:00
Sync with Wine: Add the rest of Alex Villacís Lasso : user32: Fix EM_SETLIMITTEXT with zeroed args.
svn path=/trunk/; revision=29812
This commit is contained in:
@@ -50,9 +50,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(edit);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(combo);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
|
||||
#define BUFLIMIT_MULTI 65534 /* maximum buffer size (not including '\0')
|
||||
FIXME: BTW, new specs say 65535 (do you dare ???) */
|
||||
#define BUFLIMIT_SINGLE 32766 /* maximum buffer size (not including '\0') */
|
||||
#define BUFLIMIT_INITIAL 30000 /* initial buffer size */
|
||||
#define GROWLENGTH 32 /* buffers granularity in bytes: must be power of 2 */
|
||||
#define ROUND_TO_GROW(size) (((size) + (GROWLENGTH - 1)) & ~(GROWLENGTH - 1))
|
||||
#define HSCROLL_FRACTION 3 /* scroll window by 1/3 width */
|
||||
@@ -683,7 +681,7 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
|
||||
case EM_LIMITTEXT16:
|
||||
#endif
|
||||
case EM_SETLIMITTEXT:
|
||||
EDIT_EM_SetLimitText(es, (INT)wParam);
|
||||
EDIT_EM_SetLimitText(es, wParam);
|
||||
break;
|
||||
|
||||
#ifndef __REACTOS__
|
||||
@@ -3303,7 +3301,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, LPCWSTR lpsz_replac
|
||||
|
||||
/* Issue the EN_MAXTEXT notification and continue with replacing text
|
||||
* such that buffer limit is honored. */
|
||||
if ((honor_limit) && (es->buffer_limit > 0) && (size > es->buffer_limit)) {
|
||||
if ((honor_limit) && (size > es->buffer_limit)) {
|
||||
EDIT_NOTIFY_PARENT(es, EN_MAXTEXT);
|
||||
/* Buffer limit can be smaller than the actual length of text in combobox */
|
||||
if (es->buffer_limit < (tl - (e-s)))
|
||||
@@ -4902,7 +4900,7 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode)
|
||||
es->style &= ~ES_UPPERCASE;
|
||||
}
|
||||
if (es->style & ES_MULTILINE) {
|
||||
es->buffer_limit = BUFLIMIT_MULTI;
|
||||
es->buffer_limit = BUFLIMIT_INITIAL;
|
||||
if (es->style & WS_VSCROLL)
|
||||
es->style |= ES_AUTOVSCROLL;
|
||||
if (es->style & WS_HSCROLL)
|
||||
@@ -4916,7 +4914,7 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode)
|
||||
es->style &= ~ES_AUTOHSCROLL;
|
||||
}
|
||||
} else {
|
||||
es->buffer_limit = BUFLIMIT_SINGLE;
|
||||
es->buffer_limit = BUFLIMIT_INITIAL;
|
||||
if ((es->style & ES_RIGHT) && (es->style & ES_CENTER))
|
||||
es->style &= ~ES_CENTER;
|
||||
es->style &= ~WS_HSCROLL;
|
||||
|
||||
Reference in New Issue
Block a user