Search found 31 matches

by Estien77
Sun May 02, 2010 7:06 pm
Forum: General Development
Topic: Sizer Naming Conventions
Replies: 2
Views: 686

That's an interesting concept (scoping them). I don't usually use GUI builders, but I might try it.
by Estien77
Sun May 02, 2010 2:42 am
Forum: General Development
Topic: Sizer Naming Conventions
Replies: 2
Views: 686

Sizer Naming Conventions

Why kind of naming conventions do you use on your sizers? I have a ton of sizers that I need to use in my program, and I'm having trouble coming up with intelligent names for them. Anyone have any suggestions? Here is an example: /*gs = wxGridSizer pb = wxButton sb = wxStaticBoxSizer eb = wxTextCtrl...
by Estien77
Fri Apr 30, 2010 4:08 am
Forum: C++ Development
Topic: Application Crashes on exit under Win 7
Replies: 2
Views: 570

Nevermind, I'm an idiot... I was doing some weird things in the destructor of my window class. I had forgotten that it had a destructor at all.
by Estien77
Fri Apr 30, 2010 1:25 am
Forum: C++ Development
Topic: Application Crashes on exit under Win 7
Replies: 2
Views: 570

Application Crashes on exit under Win 7

The program I am writing seems to "crash" when you exit it. This only becomes evident under Win 7 (possibly Vista as well), though the problem is not likely tied to that/those OS versions (it is a windows only app). My close function calls Destroy(); on the app window. Is there another way that I am...
by Estien77
Wed Mar 31, 2010 5:18 am
Forum: C++ Development
Topic: Multiple Displays
Replies: 1
Views: 650

Multiple Displays

Is there a way to get a program to start on a specific display? I'm writing a fullscreen clock program for a friend and he wants it to start on his second display no matter what display it is started from.
by Estien77
Tue Jan 05, 2010 2:05 pm
Forum: C++ Development
Topic: wxOwnerDrawnComboBox Show/Hide issue
Replies: 2
Views: 444

Now that I think about it, that code section has to do with the text ctrl that is associated with the combo box. I just realized that code would be executed when the text ctrl loses focus, not the combo box. I won't be able to test that because the text ctrl is not visible while the combo box is. Th...
by Estien77
Mon Jan 04, 2010 5:35 pm
Forum: C++ Development
Topic: wxOwnerDrawnComboBox Show/Hide issue
Replies: 2
Views: 444

wxOwnerDrawnComboBox Show/Hide issue

For some reason when I call wxWindow::Show on a wxOwnerDrawnComboBox (a class derived from this anyway), it glitches my program. I'm not sure how to describe the error, but my program will hang and I have to use Task Manager to exit it. I am using 2.8.10 on Windows XP. I didn't override any of the f...
by Estien77
Wed Aug 19, 2009 2:36 pm
Forum: C++ Development
Topic: Any possible speed increase?
Replies: 6
Views: 750

I did try wxArrayString after Romas suggested it. He has a point about clearing everything likely, but I think it may take more time to check to see which ones need to be updated, though I could be wrong. If I were to do that, how would I go about it? Edit: Is there a way to hide certain strings (li...
by Estien77
Wed Aug 19, 2009 2:04 pm
Forum: C++ Development
Topic: Any possible speed increase?
Replies: 6
Views: 750

Loading the comboboxes is the slowest part of my code. If i comment it out (the appends only), my code runs instantaniously. GetResearchName just (under windows) reads a string from a dll file, if it is null, then it returns the Name member of the research object at the loop index. It is called twic...
by Estien77
Wed Aug 19, 2009 1:43 pm
Forum: C++ Development
Topic: Any possible speed increase?
Replies: 6
Views: 750

Any possible speed increase?

Is there any way to get some more speed out of this code? void AGEFrame::ListResearchs() { wxBusyCursor WaitCursor; wxBusyInfo WaitInfo("Loading Research List"); string Name; wxString SearchText = wxString(ebMainResearchSearch->GetValue()).Lower(); string CompareText; int Selection = lbMainResearchL...
by Estien77
Tue Aug 18, 2009 3:47 pm
Forum: C++ Development
Topic: ComboBox list width
Replies: 1
Views: 436

ComboBox list width

Is there a way to set a ComboBox's drop down list to resize to the width of it's longest string, without resize the ComboBox itself? I'm using this construction:

Code: Select all

wxComboBox(parent, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY);
Then adding the strings dynamically.
by Estien77
Thu Aug 13, 2009 6:38 pm
Forum: C++ Development
Topic: How to pass TopWindow's public variable into child dialog?
Replies: 12
Views: 2246

choice=((usesqliteAppFrame*)wxTheApp->GetTopWindow())->choice; ((MyFrame*)this)->GetParent()->choice; The reason that the first one works is that you are casting the result of GetTopWindow to your frame class. The second should work if you move the ')' like this: ((MyFrame*)this->GetParent())->choi...
by Estien77
Thu Aug 13, 2009 6:11 pm
Forum: C++ Development
Topic: Event Handling Help
Replies: 1
Views: 413

Ok so I figured it out. I needed to call Disconnect as a method of the TextCtrl instead of a method of the frame. I also had to call Connect as a method of the text ctrl with the eventsink set to the frame's pointer.
by Estien77
Thu Aug 13, 2009 5:07 pm
Forum: C++ Development
Topic: Event Handling Help
Replies: 1
Views: 413

Event Handling Help

So I have a derived TextCtrl as follows: /* VShortTextCtrl.h */ #include "wx/wx.h" #include <string> using std::string; #include "boost/lexical_cast.hpp" using boost::lexical_cast; using boost::bad_lexical_cast; #ifndef VShortTextCtrl_h #define VShortTextCtrl_h class VShortTextCtrl : public wxTextCt...
by Estien77
Mon Aug 10, 2009 5:09 pm
Forum: C++ Development
Topic: wxScrolledWindow sizer width
Replies: 4
Views: 858

Solved! This is what I ended up doing. I derived my own class from wxScrolledWindow. Here is the header, and implementation. /* AGEScrolledWindow.h */ #include "wx/wx.h" #ifndef AGEScrolledWindow_h #define AGEScrolledWindow_h class AGEScrolledWindow : public wxScrolledWindow { public: AGEScrolledWin...