interface additions (mostly for new generic/toolwin)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster 2000-10-02 03:42:05 +00:00
parent 353149f8f2
commit cd212ee425

View File

@ -3973,3 +3973,43 @@ static void TranslateKbdEventToMouse(
pWin->ScreenToClient(pX, pY);
} // end of TranslateKbdEventToMouse
// Find the wxWindow at the current mouse position, returning the mouse
// position.
wxWindow* wxFindWindowAtPointer(wxPoint& pt)
{
return wxFindWindowAtPoint(wxGetMousePosition());
}
wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
{
#if 0
POINT pt2;
pt2.x = pt.x;
pt2.y = pt.y;
HWND hWndHit = ::WindowFromPoint(pt2);
wxWindow* win = wxFindWinFromHandle((WXHWND) hWndHit) ;
HWND hWnd = hWndHit;
// Try to find a window with a wxWindow associated with it
while (!win && (hWnd != 0))
{
hWnd = ::GetParent(hWnd);
win = wxFindWinFromHandle((WXHWND) hWnd) ;
}
return win;
#endif
return (wxWindow*)NULL;
}
// Get the current mouse position.
wxPoint wxGetMousePosition()
{
#if 0
POINT pt;
GetCursorPos( & pt );
return wxPoint(pt.x, pt.y);
#endif
return wxPoint(0,0);
}