Commit eede6b04 authored by Paul Quinn's avatar Paul Quinn Committed by Alexandre Julliard

Implementation of ChildWindowFromPointEx functions.

parent d290aa44
......@@ -366,7 +366,7 @@ file user.exe
395 stub GetIconInfo
397 pascal16 RegisterClassEx(ptr) RegisterClassEx16
398 pascal16 GetClassInfoEx(word segstr ptr) GetClassInfoEx16
399 stub ChildWindowFromPointEx
399 pascal16 ChildWindowFromPointEx(word long word) ChildWindowFromPointEx16
400 stub FinalUserInit
402 pascal16 GetPriorityClipboardFormat(ptr s_word) GetPriorityClipboardFormat16
403 pascal16 UnregisterClass(segstr word) UnregisterClass16
......
......@@ -3882,6 +3882,12 @@ DECL_WINELIB_TYPE(DRAWSTATEPROC)
#define CW_USEDEFAULT32 ((INT32)0x80000000)
#define CW_USEDEFAULT WINELIB_NAME(CW_USEDEFAULT)
/* ChildWindowFromPointEx Flags */
#define CWP_ALL 0x0000
#define CWP_SKIPINVISIBLE 0x0001
#define CWP_SKIPDISABLED 0x0002
#define CWP_SKIPTRANSPARENT 0x0004
/* Button control styles */
#define BS_PUSHBUTTON 0x00000000L
#define BS_DEFPUSHBUTTON 0x00000001L
......@@ -7329,6 +7335,9 @@ BOOL32 WINAPI CheckRadioButton32(HWND32,UINT32,UINT32,UINT32);
HWND16 WINAPI ChildWindowFromPoint16(HWND16,POINT16);
HWND32 WINAPI ChildWindowFromPoint32(HWND32,POINT32);
#define ChildWindowFromPoint WINELIB_NAME(ChildWindowFromPoint)
HWND16 WINAPI ChildWindowFromPointEx16(HWND16,POINT16,UINT16);
HWND32 WINAPI ChildWindowFromPointEx32(HWND32,POINT32,UINT32);
#define ChildWindowFromPointEx WINELIB_NAME(ChildWindowFromPointEx)
INT32 WINAPI ChoosePixelFormat(HDC32,const PIXELFORMATDESCRIPTOR*);
BOOL16 WINAPI Chord16(HDC16,INT16,INT16,INT16,INT16,INT16,INT16,INT16,INT16);
BOOL32 WINAPI Chord32(HDC32,INT32,INT32,INT32,INT32,INT32,INT32,INT32,INT32);
......
......@@ -51,7 +51,7 @@ init MAIN_UserInit
47 stdcall CheckMenuRadioItem(long long long long long) CheckMenuRadioItem32
48 stdcall CheckRadioButton(long long long long) CheckRadioButton32
49 stdcall ChildWindowFromPoint(long long long) ChildWindowFromPoint32
50 stub ChildWindowFromPointEx
50 stdcall ChildWindowFromPointEx(long long long long) ChildWindowFromPointEx32
51 stub ClientThreadConnect
52 stdcall ClientToScreen(long ptr) ClientToScreen32
53 stdcall ClipCursor(ptr) ClipCursor32
......
......@@ -497,6 +497,57 @@ HWND32 WINAPI ChildWindowFromPoint32( HWND32 hwndParent, POINT32 pt )
return hwndParent;
}
/*******************************************************************
* ChildWindowFromPointEx16 (USER.50)
*/
HWND16 WINAPI ChildWindowFromPointEx16( HWND16 hwndParent, POINT16 pt, UINT16 uFlags)
{
POINT32 pt32;
CONV_POINT16TO32( &pt, &pt32 );
return (HWND16)ChildWindowFromPointEx32( hwndParent, pt32, uFlags );
}
/*******************************************************************
* ChildWindowFromPointEx32 (USER32.50)
*/
HWND32 WINAPI ChildWindowFromPointEx32( HWND32 hwndParent, POINT32 pt,
UINT32 uFlags)
{
/* pt is in the client coordinates */
WND* wnd = WIN_FindWndPtr(hwndParent);
RECT32 rect;
if( !wnd ) return 0;
/* get client rect fast */
rect.top = rect.left = 0;
rect.right = wnd->rectClient.right - wnd->rectClient.left;
rect.bottom = wnd->rectClient.bottom - wnd->rectClient.top;
if (!PtInRect32( &rect, pt )) return 0;
wnd = wnd->child;
while ( wnd )
{
if (PtInRect32( &wnd->rectWindow, pt )) {
if ( (uFlags & CWP_SKIPINVISIBLE) &&
!(wnd->dwStyle & WS_VISIBLE) )
wnd = wnd->next;
else if ( (uFlags & CWP_SKIPDISABLED) &&
(wnd->dwStyle & WS_DISABLED) )
wnd = wnd->next;
else if ( (uFlags & CWP_SKIPTRANSPARENT) &&
(wnd->dwExStyle & WS_EX_TRANSPARENT) )
wnd = wnd->next;
else
return wnd->hwndSelf;
}
}
return hwndParent;
}
/*******************************************************************
* WINPOS_GetWinOffset
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment