Search found 23 matches

by whoops
Wed Aug 19, 2015 2:49 am
Forum: C++ Development
Topic: How to access history in wxwidgets- wxWebView when we use frames in html pages
Replies: 2
Views: 989

Re: How to access history in wxwidgets- wxWebView when we use frames in html pages

it would be nice if you put some core code to here,
or we can't know what exactly happens in your code :-)
by whoops
Tue Aug 18, 2015 3:40 am
Forum: C++ Development
Topic: * if it possible to create a word docs using wxWidgets in Windows?
Replies: 2
Views: 1902

* if it possible to create a word docs using wxWidgets in Windows?

i'd ask if it possible to create a word docs using wxWidgets in Windows? which mean that, if i typed sth. in a wxTextCtrl, and click a wxButton, and generate a default microsoft office 97-2003 .doc file (with plain text, no format information) 1) here is sample window: http://oi59.tinypic.com/29c3v...
by whoops
Sun Aug 16, 2015 12:29 pm
Forum: C++ Development
Topic: Best way to monitor internet connectivity in a wx app
Replies: 9
Views: 3643

Re: Best way to monitor internet connectivity in a wx app

it's very kind of you, doublemax, i've updated my previous answer. :-)
by whoops
Sun Aug 16, 2015 11:52 am
Forum: C++ Development
Topic: Best way to monitor internet connectivity in a wx app
Replies: 9
Views: 3643

Re: Best way to monitor internet connectivity in a wx app

in that case, e.g. when receive an event when you're connected through a router and unplug the network cable we can use two useful events to listen the plugin event and unplug event blow: •EVT_DIALUP_CONNECTED(func): A connection with the network was established. •EVT_DIALUP_DISCONNECTED(func): The...
by whoops
Sun Aug 16, 2015 12:34 am
Forum: C++ Development
Topic: Best way to monitor internet connectivity in a wx app
Replies: 9
Views: 3643

Re: Best way to monitor internet connectivity in a wx app

the following code may also better than previous answers: //#include <wx/dialup.h> wxDialUpManager *dialUp = wxDialUpManager::Create(); if ( dialUp && dialUp->IsOk() ) wxLogMessage( dialUp->IsOnline() ? wxT("Online") : wxT("Offline") ); else wxLogError( wxT("Unknown...
by whoops
Sat Aug 15, 2015 11:55 pm
Forum: C++ Development
Topic: Destructor of wxDialog Issue
Replies: 4
Views: 1789

Re: Destructor of wxDialog Issue

In closeEvent Function of main application ,before closing the main application destroying the opened dialog if the parent of the opened dialog is the main frame? that is, wxDialog (wxWindow * parent , wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize ...
by whoops
Sat Aug 15, 2015 7:57 am
Forum: C++ Development
Topic: Best way to monitor internet connectivity in a wx app
Replies: 9
Views: 3643

Re: Best way to monitor internet connectivity in a wx app

here is another way to test internet connection, in a recently question of mine answered by doublemax : #include <wx/url.h> wxURL url(wxT("http://www.codecogs.com/latex/js/eq_config.js")); if( url.IsOk() ) wxMessageBox( url.GetInputStream() ? "Connected" : "Disconnected&quo...
by whoops
Sat Aug 15, 2015 6:46 am
Forum: C++ Development
Topic: Best way to monitor internet connectivity in a wx app
Replies: 9
Views: 3643

Re: Best way to monitor internet connectivity in a wx app

internet went off which you mean that the internet is cut off? you can simply test the following code: #include <wx/protocol/http.h> wxHTTP http; wxString host("www.bing.com"); if ( http.Connect(host) ) wxLogMessage( wxT("Connected") ); else wxLogMessage( wxT("Disconnected&...
by whoops
Fri Aug 14, 2015 2:21 pm
Forum: C++ Development
Topic: * Cannot use wxMessageBox in console application?
Replies: 4
Views: 1596

Re: * Cannot use wxMessageBox in console application?

have you heard of BOINC https://boinc.berkeley.edu/ (a open-source software for volunteer computing)? because BOINC using wxWidgets to build BOINC Manager, so i learn wxWidgets, i want to build a volunteer computing project using wxWidgets, but not make it into BOINC, just using wxWidgets to design...
by whoops
Fri Aug 14, 2015 9:30 am
Forum: C++ Development
Topic: * Cannot use wxMessageBox in console application?
Replies: 4
Views: 1596

Re: * Cannot use wxMessageBox in console application?

in fact, i've read the wxWidgets tutorial in zetcode http://zetcode.com/gui/wxwidgets/ i'm sorry if this question is stupid, but i think tutorial in zetcode is not enough for me, anyhow now i'm reading "wxbook" Cross-Platform GUI Programming With wxWidget do you have any advice for me to ...
by whoops
Fri Aug 14, 2015 2:20 am
Forum: C++ Development
Topic: * Cannot use wxMessageBox in console application?
Replies: 4
Views: 1596

* Cannot use wxMessageBox in console application?

i'm using wxMessageBox function in a console application, but it threw a exception: Unhandled exception at 0x00000000 in console.exe: 0xC0000005: Access violation. here is the code: #include <wx/wx.h> int main() { wxInitializer wx; if( !wx.IsOk() ) return -1; // threw a run-time exception wxMessage...
by whoops
Fri Aug 14, 2015 12:49 am
Forum: C++ Development
Topic: Destructor of wxDialog Issue
Replies: 4
Views: 1789

Re: Destructor of wxDialog Issue

you'd better put your code to here, and we can analyze what happens to you application, here is the documentation of wxWindow::Destroy() : virtual bool wxWindow::Destroy() Destroys the window safely. Use this function instead of the delete operator, since different window classes can be destroyed d...
by whoops
Thu Aug 13, 2015 12:37 pm
Forum: C++ Development
Topic: * why wxT("%s", c_type_str) print nothing ?
Replies: 4
Views: 1638

Re: * why wxT("%s", c_type_str) print nothing ?


oh, it's very kind of you, thanks very much. sir :D
by whoops
Thu Aug 13, 2015 12:33 pm
Forum: wxDev-C++
Topic: wxExecute?
Replies: 2
Views: 3733

Re: wxExecute?

you can simply using the following code: // ... const char *helpFile = "help\\documentation.chm"; bool executed = wxShell(helpFile); if ( !executed ) wxLogDebug( wxString::Format(wxT("Failed to open \"%s\""), helpFile) ); // ... here is the documentation on wxShell boo...
by whoops
Thu Aug 13, 2015 12:02 pm
Forum: C++ Development
Topic: * why wxT("%s", c_type_str) print nothing ?
Replies: 4
Views: 1638

Re: * why wxT("%s", c_type_str) print nothing ?

In wxWidgets 3.0.2, the fllowing code: #include <wx/wx.h> int main() { wxInitializer wx; if( !wx.IsOk() ) return -1; unsigned char buffer[80] = "Guten Tag!"; wxLogMessage( wxT("wxLogMessage: %s"), buffer ); wxLogMessage( wxString(buffer) ); getchar(); return 0; } print: 19:53:16...