Can we get handle to wxDialog from its ID?

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
deepti
Earned some good credits
Earned some good credits
Posts: 102
Joined: Tue Jul 17, 2018 5:38 pm

Can we get handle to wxDialog from its ID?

Post by deepti » Tue Sep 04, 2018 5:51 pm

Hi,

Is it possible to get the handle/pointer to a wxDialog, if it's ID is known?
I need a way to close a dialog from another dialog which knows the former's ID.

Thanks in advance!

User avatar
xaviou
Super wx Problem Solver
Super wx Problem Solver
Posts: 428
Joined: Mon Aug 21, 2006 3:18 pm
Location: Annecy - France
Contact:

Re: Can we get handle to wxDialog from its ID?

Post by xaviou » Tue Sep 04, 2018 6:33 pm

Hi.

Did you try wxWindow::FindWindowById ?
It should work.

Regards
Xav'
My wxWidgets stuff web page : [email protected]'s wxStuff

deepti
Earned some good credits
Earned some good credits
Posts: 102
Joined: Tue Jul 17, 2018 5:38 pm

Re: Can we get handle to wxDialog from its ID?

Post by deepti » Tue Sep 04, 2018 7:02 pm

Thank you! that worked!

Post Reply