Search found 7 matches

by JacquesChen
Sun Jun 11, 2017 11:53 am
Forum: wxWidgets Development (Chinese)
Topic: wxExecute怎样一边运行一边输出
Replies: 4
Views: 2124

Re: wxExecute怎样一边运行一边输出

ollydbg23 wrote:不客气,这个论坛我不太来,难得来一次,能帮你解决问题也不错 :)
我现在遇到了个新的问题,我用 wxExecute调用外部程序,补做结果这些都成功了,但是,有时候外部程序崩溃,连带着把我的主程序一起搞崩溃了啊,这个我要怎么解决呢?我应该查阅哪个资料呢?
by JacquesChen
Tue May 23, 2017 12:03 am
Forum: C++ Development
Topic: How can i use wxSocketBase in wxThread to listen port?
Replies: 3
Views: 757

Re: How can i use wxSocketBase in wxThread to listen port?

Hi, Usual stanza: 1. Version of wx? 2. What OS? 3. What toolkit, if applicable? 4. What toolkit version, if applicable? But more generally, you just need to look at the thread sample. Thank you. 1. Version of wx?-------------wxMsw 3.1 2. What OS?------------------win10 3. What toolkit, if applicabl...
by JacquesChen
Sun May 21, 2017 10:49 pm
Forum: C++ Development
Topic: How can i use wxSocketBase in wxThread to listen port?
Replies: 3
Views: 757

How can i use wxSocketBase in wxThread to listen port?

this is my code,i want creat a wxThread to listen port,but i dont know how to change this code into wxThread //DialogRealTimeMonitorDeform.h #ifndef __DialogRealTimeMonitorDeform__ #define __DialogRealTimeMonitorDeform__ #include <wx/wx.h> #include <wx/socket.h> #include "GuiBase/DialogRealTimeMonit...
by JacquesChen
Sun May 21, 2017 10:44 pm
Forum: wxWidgets Development (Chinese)
Topic: 如何在wxThread里面使用wxSocketBase接收事件呢?
Replies: 1
Views: 979

如何在wxThread里面使用wxSocketBase接收事件呢?

这是我现在的代码,我想通过一个wxThread来监听端口,但是我不知道怎么在wxThread里面把事件关联上。我原来的代码是在一个窗口里面实现的,现在我想知道咱们把窗口里面的这部分代码移植到wxThread里面 //DialogRealTimeMonitorDeform.h #ifndef __DialogRealTimeMonitorDeform__ #define __DialogRealTimeMonitorDeform__ #include <wx/wx.h> #include <wx/socket.h> #include "GuiBase/DialogRealTimeMonitorD...
by JacquesChen
Tue Jan 10, 2017 2:46 pm
Forum: wxWidgets Development (Chinese)
Topic: wxStyledTextCtrl的代码补全被截断
Replies: 0
Views: 1115

wxStyledTextCtrl的代码补全被截断

我尝试用wxStyledTextCtrl里面的AutoComp做代码补全,我的代码如下: int Pos = CodeEdit->GetCurrentPos(); int Start = CodeEdit->WordStartPosition( Pos, true ); if( Pos - Start > 2 && !CodeEdit->AutoCompActive() && IfAutoComp == true ) // require 3 characters to show auto-complete { wxString TrieStr = CodeEdit->GetTextRange...
by JacquesChen
Tue Jan 10, 2017 2:41 pm
Forum: wxWidgets Development (Chinese)
Topic: wxExecute怎样一边运行一边输出
Replies: 4
Views: 2124

Re: wxExecute怎样一边运行一边输出

ollydbg23 wrote:根据wxExecute - WxWiki里面介绍的内容,推荐你使用wxProcess,可以截获子进程的console输入输出流。
谢谢,按照你的提示我解决了这个问题了
by JacquesChen
Tue Jan 03, 2017 9:40 am
Forum: wxWidgets Development (Chinese)
Topic: wxExecute怎样一边运行一边输出
Replies: 4
Views: 2124

wxExecute怎样一边运行一边输出

我有个程序是命令行的,运行过程会有很多的屏幕输出(就是下面代码里面Error的部分),我现在用wx写了个GUI来调用这个程序,现在的调用代码如下,但是有个问题,就是必须在命令行程序运行完了才能看到输出,请问我要怎么修改才能一边运行一边输出呢? wxArrayString Output, Errors; wxExecute( Cmd, Output, Errors ); LogBox->Clear(); for( int i = 0; i < Errors.GetCount(); ++i ) { LogBox->AppendText( Errors[i] + "\n" ); }