Search found 520 matches

by vdell
Wed Mar 18, 2009 4:54 pm
Forum: C++ Development
Topic: Why virtual bool OnInit()? Why virtual?
Replies: 13
Views: 1027

riruilo wrote:Why should i derieve from MyApp? Why not direcly from wxApp?
"MyApp" refers to the class that derives from wxApp:

Code: Select all

class MyApp : public wxApp
{
...
};
Naturally the class can be called whatever you want.

HTH
by vdell
Wed Mar 18, 2009 4:51 pm
Forum: Open Discussion
Topic: help with sql insert statement
Replies: 7
Views: 1567

In the future, please post topics like this to "Open Discussion". This part of the forum is only for the wxWidgets related questions. Thanks!
by vdell
Wed Mar 18, 2009 8:57 am
Forum: C++ Development
Topic: My label button appears in French instead of english...
Replies: 4
Views: 536

What happens if you don't use wxID_CLOSE?
by vdell
Tue Mar 17, 2009 11:42 am
Forum: C++ Development
Topic: Find App location and float fields.
Replies: 4
Views: 399

by vdell
Mon Mar 16, 2009 1:38 pm
Forum: C++ Development
Topic: Custom exit code from onInit?
Replies: 2
Views: 974

Try overriding wxApp::OnRun and return your custom exit codes from there.
wxWidgets Docs wrote:The return value of this function becomes the exit code of the program, so it should return 0 in case of successful termination.
by vdell
Wed Mar 11, 2009 5:28 am
Forum: C++ Development
Topic: Static libraries Vs Executable`s size
Replies: 1
Views: 395

This has been discussed many times in the forum. Do a search for "executable size" or "file size". There's also a wikipage about the subject.

HTH
by vdell
Tue Mar 10, 2009 1:42 pm
Forum: C++ Development
Topic: Please help me with this
Replies: 2
Views: 448

OT: Please use more descriptive subjects in the future. Thanks!
by vdell
Tue Mar 03, 2009 12:22 pm
Forum: C++ Development
Topic: Enumerating hard drives (multiplatform)
Replies: 2
Views: 698

doublemax wrote:http://docs.wxwidgets.org/trunk/classwx_f_s_volume.html

but it's only implemented on MSW
And it should also be noted that the function GetVolumes is very slow!
by vdell
Fri Feb 20, 2009 7:40 am
Forum: C++ Development
Topic: How do i get the file or image extension?
Replies: 3
Views: 398

Use wxFileName:

Code: Select all

wxFileName fn ( path_to_your_file );
fn.GetExt();
by vdell
Thu Feb 19, 2009 7:23 am
Forum: C++ Development
Topic: How to set wxTE_PROCESS_ENTER with XRC?
Replies: 3
Views: 467

violethill wrote:

Code: Select all

wxComboBox *m_ComboBox = (wxComboBox*)FindWindow( XRCID( "cbName" ) );
FYI, it's recommended to use dynamic_cast/wxDynamiCast instead of C-style casts.
by vdell
Wed Feb 18, 2009 12:47 pm
Forum: C++ Development
Topic: Getting home directory location
Replies: 5
Views: 624

Have a look at wxStandardPaths.
by vdell
Mon Feb 16, 2009 11:46 am
Forum: C++ Development
Topic: How to use wxGetApp() ?
Replies: 4
Views: 733

j0ck3 wrote:So if I understand you, I don't need to do anything at all in the files of my frames? But they will still be able to call wxGetApp()?
That's correct. You of course need to do include YourApp.hpp in the places where you need wxGetApp().
by vdell
Mon Feb 16, 2009 11:18 am
Forum: C++ Development
Topic: How to use wxGetApp() ?
Replies: 4
Views: 733

Code: Select all

// YourApp.hpp

class YourApp : public wxApp
{
....
};

DECLARE_APP ( YourApp );

// YourApp.cpp

IMPLEMENT_APP ( YourApp );
by vdell
Fri Feb 13, 2009 8:11 pm
Forum: General Development
Topic: gui is ugly on linux
Replies: 8
Views: 1871

How about posting a screenshot of the "ugly GUI"?
by vdell
Fri Feb 13, 2009 8:09 pm
Forum: C++ Development
Topic: Download a simple html document
Replies: 1
Views: 477

I use the following function in my app: void col::get_webpage ( const wxURI &rUri, wxString &rTo, wxUint32 timeout, wxUint32 port ) { wxHTTP http; http.SetHeader ( "Accept" , "text/*" ); http.SetHeader ( "Accept-Encoding", "gzip" ); http.SetHeader ( "User-Agent", wxGetApp().GetAppName() ); http.SetT...