mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 18:01:07 +00:00
[Win32SS]
- Cleanup error codes for Classes and Menus. - Update (Sync/Port) User32:Dialog to Wine Staging 1.9.11, see CORE-11368. - Now pass exactly the same tests as windows, except for the two ToDos lines 1596 & 1617. The other test failures are on wine for not being compatible! svn path=/trunk/; revision=71904
This commit is contained in:
parent
1c7b4d4699
commit
d9af32368a
|
@ -1283,11 +1283,7 @@ IntGetAtomFromStringOrAtom(
|
|||
}
|
||||
else
|
||||
{
|
||||
if (Status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
{
|
||||
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
}
|
||||
else
|
||||
if (Status != STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
}
|
||||
|
@ -1362,7 +1358,6 @@ IntGetClassAtom(
|
|||
Link);
|
||||
if (Class == NULL)
|
||||
{
|
||||
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
return (RTL_ATOM)0;
|
||||
}else{TRACE("Step 4: 0x%p\n",Class );}
|
||||
|
||||
|
@ -1415,7 +1410,6 @@ IntGetAndReferenceClass(PUNICODE_STRING ClassName, HINSTANCE hInstance, BOOL bDe
|
|||
ERR("Class \"%wZ\" not found\n", ClassName);
|
||||
}
|
||||
|
||||
EngSetLastError(ERROR_CANNOT_FIND_WND_CLASS);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1539,6 +1533,7 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
|
|||
&Link);
|
||||
if (ClassAtom == (RTL_ATOM)0)
|
||||
{
|
||||
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
TRACE("UserUnregisterClass: No Class found.\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -1921,6 +1921,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
|||
Class = IntGetAndReferenceClass(ClassName, Cs->hInstance, FALSE);
|
||||
if(!Class)
|
||||
{
|
||||
EngSetLastError(ERROR_CANNOT_FIND_WND_CLASS);
|
||||
ERR("Failed to find class %wZ\n", ClassName);
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -2856,6 +2857,7 @@ NtUserFindWindowEx(HWND hwndParent,
|
|||
if (!IntGetAtomFromStringOrAtom(&ClassName,
|
||||
&ClassAtom))
|
||||
{
|
||||
EngSetLastError(ERROR_CANNOT_FIND_WND_CLASS);
|
||||
_SEH2_LEAVE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ extern ATOM AtomFlashWndState;
|
|||
#define HAS_THINFRAME(Style, ExStyle) \
|
||||
(((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
|
||||
|
||||
#define HAS_MENU(pWnd,style) ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) && IntIsMenu(UlongToHandle(pWnd->IDMenu)))
|
||||
#define HAS_MENU(pWnd,style) ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) && (pWnd->IDMenu) && IntIsMenu(UlongToHandle(pWnd->IDMenu)))
|
||||
|
||||
#define IntIsDesktopWindow(WndObj) \
|
||||
(WndObj->spwndParent == NULL)
|
||||
|
|
|
@ -308,7 +308,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
|
|||
|
||||
if (GET_WORD(p))
|
||||
{
|
||||
info->data = p + 1;
|
||||
info->data = p;
|
||||
p += GET_WORD(p) / sizeof(WORD);
|
||||
}
|
||||
else info->data = NULL;
|
||||
|
@ -931,7 +931,10 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
|||
{
|
||||
pos.x += MulDiv(template.x, xBaseUnit, 4);
|
||||
pos.y += MulDiv(template.y, yBaseUnit, 8);
|
||||
if (!(template.style & (WS_CHILD|DS_ABSALIGN))) ClientToScreen( owner, &pos );
|
||||
//
|
||||
// REACTOS : Need an owner to be passed!!!
|
||||
//
|
||||
if (!(template.style & (WS_CHILD|DS_ABSALIGN)) && owner ) ClientToScreen( owner, &pos );
|
||||
}
|
||||
if ( !(template.style & WS_CHILD) )
|
||||
{
|
||||
|
@ -1067,6 +1070,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
|||
if (template.style & WS_VISIBLE && !(GetWindowLongPtrW( hwnd, GWL_STYLE ) & WS_VISIBLE))
|
||||
{
|
||||
ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
|
||||
UpdateWindow( hwnd );
|
||||
IntNotifyWinEvent(EVENT_SYSTEM_DIALOGSTART, hwnd, OBJID_WINDOW, CHILDID_SELF, 0);
|
||||
}
|
||||
return hwnd;
|
||||
|
@ -1674,7 +1678,7 @@ DefDlgProcA(
|
|||
BOOL result = FALSE;
|
||||
|
||||
/* Perform DIALOGINFO initialization if not done */
|
||||
if(!(dlgInfo = DIALOG_get_info( hDlg, TRUE ))) return 0;
|
||||
if(!(dlgInfo = DIALOG_get_info( hDlg, Msg == WM_NCCREATE ))) return 0;
|
||||
|
||||
SetWindowLongPtrW( hDlg, DWLP_MSGRESULT, 0 );
|
||||
|
||||
|
@ -1734,7 +1738,7 @@ DefDlgProcW(
|
|||
BOOL result = FALSE;
|
||||
|
||||
/* Perform DIALOGINFO initialization if not done */
|
||||
if(!(dlgInfo = DIALOG_get_info( hDlg, TRUE ))) return 0;
|
||||
if(!(dlgInfo = DIALOG_get_info( hDlg, Msg == WM_NCCREATE ))) return 0;
|
||||
|
||||
SetWindowLongPtrW( hDlg, DWLP_MSGRESULT, 0 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue