getting a pointer to a Project's window
Posted: Sun Oct 04, 2009 10:13 pm
How do I get a pointer to an Audacity Project's window? Something like:
Tracing up the inheritance tree for AudacityProject I find:
(where wxTopLevelWindowMSW is compiled in on a processor dependent basis) but doing:
causes a compiler error. I’m concerned that if I force it with a cast (which works on 64-bit Vista SP2):
I will get problems, especially on other OSes. Note that wxTopLevelWindowMSW is a Windows specific class.
Code: Select all
wxWindow * projectWindow = gAudacityProjects[0]->GetWindow();Tracing up the inheritance tree for AudacityProject I find:
Code: Select all
class AUDACITY_DLL_API AudacityProject: public wxFrame,
class WXDLLEXPORT wxFrame : public wxFrameBase
class WXDLLEXPORT wxFrameBase : public wxTopLevelWindow
class WXDLLEXPORT wxTopLevelWindow : public wxTopLevelWindowMSW
class WXDLLEXPORT wxTopLevelWindowMSW : public wxTopLevelWindowBase
class WXDLLEXPORT wxTopLevelWindowBase : public wxWindowCode: Select all
wxWindow * projectWindow = gAudacityProjects[0];Code: Select all
wxWindow * projectWindow = (wxWindow *)gAudacityProjects[0];