[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: [XaraXtreme-dev] ChildWindowFromPoint and other questions
- From: Alex Bligh <alex@xxxxxxxxxxx>
- Date: Sun, 16 Apr 2006 20:24:03 +0100
- Subject: Re: [XaraXtreme-dev] ChildWindowFromPoint and other questions
Mark Loumbert wrote:
Hi !
Could you please make clear for me what is exported version and what is
not ? And also I thought this function is a part of wxWidgets, so what
exactly did you do ? I am new to this environment so may ask silly
questions sometimes.
OK. I'll try.
The documentation for wxWidgets has (inter-alia)
wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
which is declared extern in utils.h, so you can use it in the program.
That's what you were looking at.
But GetChildWindowFromPoint does something a bit different, in that
it ONLY looks for child windows of the HWND passed (as I understand it).
So if there is a window on top of the HWND passed, which is not a
child window, it's ignored. That's a subtle difference, but relevant
when dragging, as (e.g.) on a solid drag, the thing that's being
dragged is likely to be what's on-top, but you want the child window
of (say) some dialog underneath.
wxWidgets actually has this function internally, but it is not
declared "extern" in any of the header files, so you can't call
it. It's exactly the same, but also takes a wxWindow *, i.e. it's
overloaded. It's a pity it's not exported, as it does exactly what
you would want it to do (I needed it too for fixing dragmgr as
it happens). So what I did was duplicate the (short) function
in wxXtra, and call it wxChildWindowFromPoint (have a look at
wxXtra/cwfrompoint.h I've just checked in). I renamed it as I've
also asked the wxWidgets folks to export the function, and I
didn't want a name clash if/when they do.
Alex