Search found 84 matches

by swmp
Mon Mar 31, 2008 1:36 pm
Forum: C++ Development
Topic: program use wxXmlResource cann't handle event from dll
Replies: 0
Views: 299

program use wxXmlResource cann't handle event from dll

I creat an button from a dll, and handle the event in the program, it runs ok. If I write wxXmlResource::Get()->InitAllHandlers() int program wxapp::OnInit, I cann't handle the button event in my program. I have to use xrc resources and dll in my program, but they seem not compatible. what can i do ...
by swmp
Wed Aug 29, 2007 9:40 am
Forum: C++ Development
Topic: XRC Resource from a wxString not a File
Replies: 4
Views: 969

I don't think this works well.

can somebody tell me how to do this?

thanks!
by swmp
Wed Aug 15, 2007 9:58 am
Forum: C++ Development
Topic: is there a way to get where the wxCloseEvent post
Replies: 2
Views: 365

no,
first,i have a frame called frame1,the i creat a frame called frame2,then i creat an wxpanel from a dll for frame2.


when i close the frame 2 or creat the panel , frame1 get an close event.
by swmp
Wed Aug 15, 2007 5:59 am
Forum: C++ Development
Topic: is there a way to get where the wxCloseEvent post
Replies: 2
Views: 365

is there a way to get where the wxCloseEvent post

my program get a closeevent but i don't post it,

is there a way to get where the wxCloseEvent post?

Can the windows system post it ?


thx
by swmp
Fri Jan 12, 2007 6:16 am
Forum: C++ Development
Topic: a problem call dll founction
Replies: 6
Views: 1248

BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: { wxSetInstance((HINSTANCE)hModule); int argc = 0; char **argv = NULL; wxEntryStart(argc, argv); if ( !wxTheApp || !wxTheApp->CallOnInit() ) return FALSE; } ...
by swmp
Thu Jan 11, 2007 1:46 am
Forum: C++ Development
Topic: Events of Controls from dll
Replies: 1
Views: 468

If the event table is in the dll.cpp, the event works.
by swmp
Tue Jan 09, 2007 6:48 am
Forum: C++ Development
Topic: Events of Controls from dll
Replies: 1
Views: 468

Events of Controls from dll

I wrote some small application and dll using wxWidgets 2.6.2.
The main application creates main window, dynamically loads the dll library and calls it
by swmp
Tue Jan 09, 2007 1:44 am
Forum: C++ Development
Topic: Dll App and Events
Replies: 14
Views: 1776

Have you sloved this problem?

Can you tell how? I also meet it.

Thanks very much! :shock:
by swmp
Fri Oct 27, 2006 8:14 am
Forum: C++ Development
Topic: flicker when reCreat panels in the frame
Replies: 6
Views: 908

thanks ,the problem is that, I have to load it from xrc files. ///Read panel from xrc file wxPanel* new_panel = wxXmlResource::Get()->LoadPanel(this, panelname); So what? We also load all our resources from XRC files, with derived classes: resource.xrc <object class="wxPanel" name="panel_resource_n...
by swmp
Wed Oct 18, 2006 1:47 pm
Forum: C++ Development
Topic: flicker when reCreat panels in the frame
Replies: 6
Views: 908

We used to have a similar problem for a notebook tab panel. We made a class for it, and hide it in the first line of the constructor: MyPanel::MyPanel (*params*) : wxPanel (...), members (_params) { Show (false); // init other class members } thanks ,the problem is that, I have to load it from xrc ...
by swmp
Wed Oct 18, 2006 8:40 am
Forum: C++ Development
Topic: flicker when reCreat panels in the frame
Replies: 6
Views: 908

thanks , I use wxAui in it. here is the codes used to change the panel: ///Read panel from xrc file wxPanel* new_panel = wxXmlResource::Get()->LoadPanel(this, panelname); ///Added as new centerpanel m_mgr.AddPane(new_panel,wxPaneInfo().Name(panelname). CenterPane()); ////do someting { ... } ///Destr...
by swmp
Tue Oct 17, 2006 6:59 am
Forum: C++ Development
Topic: flicker when reCreat panels in the frame
Replies: 6
Views: 908

flicker when reCreat panels in the frame

as you see in picture, when I change the panel, it flickers in the left up
corner ,when creating the new panel.
is there a way to aviod the flickering ?

Image

thanks very much!
by swmp
Mon Aug 28, 2006 10:27 am
Forum: C++ Development
Topic: how to load custom Ctronls form xrc?
Replies: 6
Views: 1234

thanks , but if I want to get some value from the xrc file, how to do? cpp class Monitor_Window : public wxPanel { ........ public: wxString mytext; } xrc .... <object class="Monitor_Window" name="mon_1"> <style>wxTAB_TRAVERSAL</style> <mytext>text form xml<mytext> </object> .... Is there a way to g...
by swmp
Mon Aug 28, 2006 3:27 am
Forum: C++ Development
Topic: how to load custom Ctronls form xrc?
Replies: 6
Views: 1234

thanks DavidHart, Also, be aware that any other constructor isn't called by XRC, so don't do anything important inside one! but I have to do something in the constructor, such as : Monitor_Window() { new wxTextCtrl(this, -1,"swmp"); } if using <object class="wxPanel" name="mon_1" subclass="Monitor_W...
by swmp
Fri Aug 25, 2006 9:02 am
Forum: C++ Development
Topic: how to load custom Ctronls form xrc?
Replies: 6
Views: 1234

how to load custom Ctronls form xrc?

I write a class derive from wxPanel, but have some problems when load it. here is the code: class Monitor_Window : public wxPanel { public: DECLARE_DYNAMIC_CLASS(Monitor_Window) public: ///监控窗口显示的内容 wxWindow* m_window; public: Monitor_Window() { } Monitor_Window(wxWindow* parent, wxWindowID id = -1,...