Creating a sub window

BlitzMax Modules Forums/Brucey's Modules/Creating a sub window

complete code:

SuperStrict

'import needed modules
Framework wx.wxApp
Import wx.wxFrame
Import wx.wxComboBox
Import wx.wxAui
Import wx.wxTextCtrl
Import wx.wxTreeCtrl
Import wx.wxSpinCtrl
Import wx.wxButton
Import wx.wxBitmapButton
Import wx.wxStaticText
Import wx.wxArtProvider
Import wx.wxColourDialog
Import wx.wxHtmlWindow

'consts
Const wxDEFAULT_NO_RESIZE:Int = wxSYSTEM_MENU | wxMINIMIZE_BOX | ..
wxMAXIMIZE_BOX | wxCLOSE_BOX | wxCAPTION | wxCLIP_CHILDREN | wxBORDER_STATIC


'App stuff
Type MyApp Extends wxApp

	Field frame:myFrame
	Field box1:wxComboBox

	Method OnInit:Int()
		
		'create window and show it
		frame = myFrame(New myFrame.Create(,,"POS Tracker", 200, 200, 800, 600, wxDEFAULT_NO_RESIZE))
		frame.show()
		
	
		'return successful
		Return True
	
	End Method

End Type

'The window
Type myFrame Extends wxFrame

	'constants
	Const menu_Exit:Int = 201
	Const tb_Add:Int = 202
	Const tb_Remove:Int = 203
	Const win_posadd:Int = 204
	
	'on start up...
	Method OnInit()
		
		
		'MENU BAR
		Local mb:wxMenuBar = New wxMenuBar.Create()
		
		Local fileMenu:wxMenu = New wxMenu.Create()
		fileMenu.Append(menu_Exit, "Exit")
		
		mb.Append(fileMenu,"File")
		SetMenuBar(mb)
		
		'STATUS BAR
		CreateStatusBar()
		SetStatusText("Welcome to the POS Tracker!")
		
		'toolbar
		Local tb1:wxToolBar = New wxToolBar.Create(Self, wxID_ANY, ,, ,, wxTB_FLAT | wxTB_NODIVIDER | wxTB_HORZ_TEXT)
		tb1.SetToolBitmapSize(20, 20)
		tb1.AddTool(tb_Remove, "Remove POS", wxArtProvider.GetBitmap(wxART_ERROR,,20,20))
		tb1.AddTool(tb_Add, "Add POS", wxArtProvider.GetBitmap(wxART_ADD_BOOKMARK,,20,20))
		tb1.Realize()
		
		
		'EVENT HANDLING
		Connect(menu_Exit, wxEVT_COMMAND_MENU_SELECTED, OnExit)
		Connect(tb_Add, wxEVT_COMMAND_TOOL_CLICKED, CreateAddPOSWindow)
		
	End Method
	
	'a function to handle exiting...
	Function OnExit(event:wxEvent)
		wxFrame(event.parent).Close(True)
	End Function
	
	'Create a Add POS window...
	Function CreateAddPOSWindow(event:wxEvent)
	
		Local Addpos:wxDialog = New wxDialog.Create_(, , "Add POS", , , 500, 300)
		
	End Function

End Type



'run the program
New MyApp.run()


Giving me a compilation error, and I know why: It wants wxwindow not wxframe, but i don't know how to fix that.