You have to use the wxWindow methods.
If you want to use wx-c, provided with wx.Net project than the right header are here: wx-c header
And your code for this header:
Code: Select all
#Include Once "wx-c 0.9.2/wx.bi"
Const FRAME_W = 500
Const FRAME_H = 400
''
'' ids
''
Enum
ID_FRAME=1
ID_PANEL
ID_CLICKMEBUTTON
ID_EXITBUTTON
ID_DIAG_EXITBUTTON
End Enum
Declare Function app_oninit_cb WXCALL () As wxBool
Declare Function app_onexit_cb WXCALL () As wxInt
''
'' globals
''
Dim Shared As wxApp Ptr app
Dim Shared As wxDialog Ptr dialog
'':::::
'''
'' main
''
'Dim apps As _wxApp Ptr
app = wxApp_ctor()
wxApp_RegisterVirtual(app, @app_oninit_cb, @app_onexit_cb)
wxApp_Run
'':::::
''
'' dialog's exit button callback
''
Sub diag_exitbutton_cb WXCALL (ByVal event As _wxEvent Ptr,iListener as wxInt)
'wxMsgBox(,wxString_ctorUTF8("Bye Bye...1"), wxString_ctorUTF8("Window Closed!"))
wxWindow_Destroy( dialog)
app_onexit_cb( )
End Sub
'':::::
''
'' on init callback
''
Function app_oninit_cb WXCALL () As wxBool
Dim As Integer ypos, size
Dim xrc As wxXmlResource Ptr
'' create the main window
xrc = wxXmlResource_ctorByFilemask(wxString_ctorUTF8("frmMayaMyAppsClient.xrc"), XRC_USE_LOCALE)
wxXmlResource_InitAllHandlers(xrc)
dialog = wxDialog_ctor( )
wxDialog_Create(dialog,WX_NULL,-1, wxString_ctorUTF8("Press Exit"),_
10, 10, 500, 400, _
wxDIALOG_DEFAULT_STYLE, 0 ) ' Does not make any difference what type you set as they are overwritten by XRC
wxXmlResource_LoadDialogDlg(xrc, dialog, 0, wxString_ctorUTF8("frmMain"))
wxWindow_CenterOnScreen(dialog, wxBOTH )
wxEvtHandler_proxy(dialog,@diag_exitbutton_cb)
wxEvtHandler_Connect(dialog,wxEvent_EVT_CLOSE_WINDOW( ))
Dim m_notebook1 As wxNotebook Ptr
Dim m_clInstalled As wxCheckListBox Ptr
Dim m_staticText2 As wxWindow Ptr
m_clInstalled = wxWindow_FindWindowByName(wxString_ctorUTF8("m_hyperlink1"), dialog)
m_staticText2 = wxWindow_FindWindowByName(wxString_ctorUTF8("m_staticText2"), dialog)
wxWindow_SetLabel(m_staticText2, wxString_ctorUTF8("test"))
wxWindow_Hide(m_clInstalled)
wxWindow_Show(dialog)
Function = wxApp_OnInit(app)
End Function
Function app_onexit_cb WXCALL () As wxInt
Function = wxApp_OnExit( app )
End
End Function