mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
- Wine sync up to 1.1.29 Edit controls.
svn path=/trunk/; revision=43089
This commit is contained in:
parent
bbbab20bda
commit
ea148f5053
2 changed files with 34 additions and 60 deletions
|
@ -68,6 +68,8 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||||
#define EF_USE_SOFTBRK 0x0100 /* Enable soft breaks in text. */
|
#define EF_USE_SOFTBRK 0x0100 /* Enable soft breaks in text. */
|
||||||
#define EF_APP_HAS_HANDLE 0x0200 /* Set when an app sends EM_[G|S]ETHANDLE. We are in sole control of
|
#define EF_APP_HAS_HANDLE 0x0200 /* Set when an app sends EM_[G|S]ETHANDLE. We are in sole control of
|
||||||
the text buffer if this is clear. */
|
the text buffer if this is clear. */
|
||||||
|
#define EF_DIALOGMODE 0x0400 /* Indicates that we are inside a dialog window */
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
END_0 = 0, /* line ends with terminating '\0' character */
|
END_0 = 0, /* line ends with terminating '\0' character */
|
||||||
|
@ -3201,29 +3203,7 @@ static BOOL EDIT_EM_Undo(EDITSTATE *es)
|
||||||
*/
|
*/
|
||||||
static BOOL EDIT_IsInsideDialog(EDITSTATE *es)
|
static BOOL EDIT_IsInsideDialog(EDITSTATE *es)
|
||||||
{
|
{
|
||||||
#ifdef __REACTOS__
|
return (es->flags & EF_DIALOGMODE);
|
||||||
if (es->hwndParent && es->hwndParent != GetDesktopWindow())
|
|
||||||
{
|
|
||||||
if (GetClassLongPtrW (es->hwndParent, GCW_ATOM) == (DWORD)MAKEINTATOM(32770))
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
return FALSE;
|
|
||||||
#else
|
|
||||||
WND *pParent;
|
|
||||||
BOOL r = FALSE;
|
|
||||||
|
|
||||||
if (es->hwndParent)
|
|
||||||
{
|
|
||||||
pParent = WIN_GetPtr(es->hwndParent);
|
|
||||||
if (pParent && pParent != WND_OTHER_PROCESS && pParent != WND_DESKTOP)
|
|
||||||
{
|
|
||||||
if (pParent->flags & WIN_ISDIALOG)
|
|
||||||
r = TRUE;
|
|
||||||
WIN_ReleasePtr(pParent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3679,32 +3659,32 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key)
|
||||||
/* If the edit doesn't want the return send a message to the default object */
|
/* If the edit doesn't want the return send a message to the default object */
|
||||||
if(!(es->style & ES_MULTILINE) || !(es->style & ES_WANTRETURN))
|
if(!(es->style & ES_MULTILINE) || !(es->style & ES_WANTRETURN))
|
||||||
{
|
{
|
||||||
HWND hwndParent;
|
|
||||||
DWORD dw;
|
DWORD dw;
|
||||||
|
|
||||||
if (!EDIT_IsInsideDialog(es)) return 1;
|
if (!EDIT_IsInsideDialog(es)) break;
|
||||||
if (control) break;
|
if (control) break;
|
||||||
hwndParent = GetParent(es->hwndSelf);
|
dw = SendMessageW( es->hwndParent, DM_GETDEFID, 0, 0 );
|
||||||
dw = SendMessageW( hwndParent, DM_GETDEFID, 0, 0 );
|
|
||||||
if (HIWORD(dw) == DC_HASDEFID)
|
if (HIWORD(dw) == DC_HASDEFID)
|
||||||
{
|
{
|
||||||
SendMessageW( hwndParent, WM_COMMAND,
|
HWND hwDefCtrl = GetDlgItem(es->hwndParent, LOWORD(dw));
|
||||||
MAKEWPARAM( LOWORD(dw), BN_CLICKED ),
|
if (hwDefCtrl)
|
||||||
(LPARAM)GetDlgItem( hwndParent, LOWORD(dw) ) );
|
{
|
||||||
|
SendMessageW(es->hwndParent, WM_NEXTDLGCTL, (WPARAM)hwDefCtrl, (LPARAM)TRUE);
|
||||||
|
PostMessageW(hwDefCtrl, WM_KEYDOWN, VK_RETURN, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
SendMessageW( hwndParent, WM_COMMAND, IDOK, (LPARAM)GetDlgItem( hwndParent, IDOK ) );
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VK_ESCAPE:
|
case VK_ESCAPE:
|
||||||
if (!(es->style & ES_MULTILINE))
|
if (!(es->style & ES_MULTILINE) && EDIT_IsInsideDialog(es))
|
||||||
SendMessageW(GetParent(es->hwndSelf), WM_COMMAND, IDCANCEL, (LPARAM)GetDlgItem( GetParent(es->hwndSelf), IDCANCEL ) );
|
PostMessageW(es->hwndParent, WM_CLOSE, 0, 0);
|
||||||
break;
|
break;
|
||||||
case VK_TAB:
|
case VK_TAB:
|
||||||
|
if ((es->style & ES_MULTILINE) && EDIT_IsInsideDialog(es))
|
||||||
SendMessageW(es->hwndParent, WM_NEXTDLGCTL, shift, 0);
|
SendMessageW(es->hwndParent, WM_NEXTDLGCTL, shift, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5232,7 +5212,11 @@ LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
|
||||||
if (es->style & ES_MULTILINE)
|
if (es->style & ES_MULTILINE)
|
||||||
result |= DLGC_WANTALLKEYS;
|
result |= DLGC_WANTALLKEYS;
|
||||||
|
|
||||||
if (lParam && (((LPMSG)lParam)->message == WM_KEYDOWN))
|
if (lParam)
|
||||||
|
{
|
||||||
|
es->flags|=EF_DIALOGMODE;
|
||||||
|
|
||||||
|
if (((LPMSG)lParam)->message == WM_KEYDOWN)
|
||||||
{
|
{
|
||||||
int vk = (int)((LPMSG)lParam)->wParam;
|
int vk = (int)((LPMSG)lParam)->wParam;
|
||||||
|
|
||||||
|
@ -5242,16 +5226,6 @@ LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
|
||||||
if (SendMessageW(GetParent(hwnd), CB_GETDROPPEDSTATE, 0, 0))
|
if (SendMessageW(GetParent(hwnd), CB_GETDROPPEDSTATE, 0, 0))
|
||||||
result |= DLGC_WANTMESSAGE;
|
result |= DLGC_WANTMESSAGE;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
switch (vk)
|
|
||||||
{
|
|
||||||
case VK_ESCAPE:
|
|
||||||
SendMessageW(GetParent(hwnd), WM_CLOSE, 0, 0);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -231,7 +231,7 @@ snmpapi -
|
||||||
User32 -
|
User32 -
|
||||||
reactos/dll/win32/user32/controls/button.c # Synced to Wine-1_1_22
|
reactos/dll/win32/user32/controls/button.c # Synced to Wine-1_1_22
|
||||||
reactos/dll/win32/user32/controls/combo.c # Synced to Wine-1_1_22
|
reactos/dll/win32/user32/controls/combo.c # Synced to Wine-1_1_22
|
||||||
reactos/dll/win32/user32/controls/edit.c # Synced to Wine-1_1_22
|
reactos/dll/win32/user32/controls/edit.c # Synced to Wine-1_1_29
|
||||||
reactos/dll/win32/user32/controls/icontitle.c # Synced to Wine-1_1_13
|
reactos/dll/win32/user32/controls/icontitle.c # Synced to Wine-1_1_13
|
||||||
reactos/dll/win32/user32/controls/listbox.c # Synced to Wine-1_1_22
|
reactos/dll/win32/user32/controls/listbox.c # Synced to Wine-1_1_22
|
||||||
reactos/dll/win32/user32/controls/scrollbar.c # Forked
|
reactos/dll/win32/user32/controls/scrollbar.c # Forked
|
||||||
|
|
Loading…
Reference in a new issue