Hello mans!
I am newbie. Anybody can show me an wxMDIParentFrame example code + wxMDIChildFrame example code for PureBasic? I am using PB 4.51 and wxWidget Port for PB.
Thank you.
wxMDIParentFrame ?
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: wxMDIParentFrame ?
...have you taken a look at the examples supplied with the package?
http://www.purebasic.fr/english/viewtopic.php?t=35923
http://www.purebasic.fr/english/viewtopic.php?t=35923
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: wxMDIParentFrame ?
The package don't have MDI examples.
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: wxMDIParentFrame ?
.... if you can follow the example for a regular frame (window), then MDI should be similar, the wxWidget online notes should help? 

IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: wxMDIParentFrame ?
This is my example MDI code. The wxMDIChildFrame_Create did not work. Why ?
Code: Select all
XIncludeFile ( #PB_Compiler_Home + "include/inc.wx.pbi")
EnableExplicit
Global APP.i
Procedure OnInit()
Protected frame
Protected mdiparent
Protected mdichild
frame = wxFrame()
mdiparent = wxMDIParentFrame()
mdichild = wxMDIChildFrame()
wxFrame_Create(frame, 0, -1, "", wxSize(-1,-1), wxSize(640,480), #wxDEFAULT_FRAME_STYLE, "frame")
wxFrame_Maximize (frame, #True)
;wxMDIParentFrame_RegisterVirtual(mdiparent, wxMDIParentFrame_OnCreateClient(mdiparent))
;wxMDIParentFrame_OnCreateClient(mdiparent)
wxMDIParentFrame_Create(frame, 0, -1, "Parent window", wxSize(-1,-1), wxSize(640,480), #wxDEFAULT_FRAME_STYLE, "frame")
;wxMDIChildFrame_Activate (mdiparent)
wxMDIChildFrame_Create(mdichild, mdiparent, -1, "Child window", wxSize(-1,-1), wxSize(100,100), #wxDEFAULT_FRAME_STYLE, "mdiparent")
wxWindow_Show(frame,#True)
ProcedureReturn wxApp_OnInit(app)
EndProcedure
Procedure OnExit()
ProcedureReturn wxApp_OnExit(app)
EndProcedure
Procedure Main()
app = wxApp()
wxApp_RegisterVirtual(app,@OnInit(),@OnExit())
wxApp_Run(0,0)
EndProcedure:Main()