x,y client to screen problem Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 427
Joined: Fri Dec 09, 2016 7:28 am
Contact:

x,y client to screen problem

Post by cutecode »

I want to dispay wxMiniFrame near wxAuiToolbarItem pressed

Code: Select all

	wxRect rc(300, 300, 350, 500);

    if(tlid != -1)
    {
        wxRect r = m_toolbar->GetToolRect(tlid);
        wxSize s(r.x, r.y);
        wxSize s2 = m_toolbar->ClientToWindowSize(s);
        rc.x = s2.x;
        rc.y = s2.y;
    }
after calling ClientToWindowSize() x,y does not changed.

How to convert toolbar coordinates to screen coordinates?

Thank you
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: x,y client to screen problem

Post by ONEEYEMAN »

Hi,
Is this code inside some event handler?
And are you sure that those coordinates has to be converted?

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: x,y client to screen problem

Post by doublemax »

Try wxWindow::ClientToScreen() instead of ClientToWindowSize()
Use the source, Luke!
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 427
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: x,y client to screen problem

Post by cutecode »

thank you doublemax
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
Post Reply