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: 115
Joined: Tue Jul 17, 2018 5:38 pm

Can we get handle to wxDialog from its ID?

Post by deepti »

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: 437
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 »

Hi.

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

Regards
Xav'
My wxWidgets stuff web page : X@v's wxStuff
deepti
Earned some good credits
Earned some good credits
Posts: 115
Joined: Tue Jul 17, 2018 5:38 pm

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

Post by deepti »

Thank you! that worked!
Post Reply