Search found 203 matches

by eco
Fri Apr 01, 2005 1:05 am
Forum: C++ Development
Topic: help with string to long conversion
Replies: 3
Views: 954

Be sure to delete that pointer when you are done with it. :) Just making it on the stack is a bit more friendly since you don't have to cleanup afterwards.
by eco
Wed Mar 30, 2005 4:29 am
Forum: C++ Development
Topic: I need some basic help with wxDateTime
Replies: 2
Views: 840

wxDateTime::GetTicks() is not a static member and can only be called from an instantiated object. GetTicks() doesn't really even make sense without some data to go along with it.

It's designed to be used something like this:

Code: Select all

wxDateTime dt = wxDateTime::Today();
time_t ticks = dt.GetTicks();
by eco
Tue Mar 29, 2005 8:37 am
Forum: C++ Development
Topic: GetSize vs GetClientSize
Replies: 10
Views: 3133

It may be due to the differences between X11 based systems and MSW and others. You aren't allowed to draw or do anything to window decoration on X11 (you can just not draw them though and fake their appearance i.e. XMMS). Still, getting the actual window size would be useful for position and I'm sur...
by eco
Tue Mar 29, 2005 8:32 am
Forum: C++ Development
Topic: Problem with events for wxNotebook
Replies: 22
Views: 4679

If I remember correctly, despite what the documentation says wxTabCtrl is simply the base class for wxNotebook, wxListbook, and wxChoicebook (since they all share similar functionality a base class to handle the commonalities between them makes sense). You wouldn't use a wxTabCtrl directly. Now, to ...
by eco
Mon Mar 28, 2005 11:40 am
Forum: Announcements and Discoveries
Topic: new development version of wxFormBuilder
Replies: 19
Views: 5563

Looks very nice.
by eco
Sun Mar 27, 2005 9:54 pm
Forum: General Development
Topic: the left-click menu
Replies: 2
Views: 1065

I'm sure you mean Right-Click menu (called a context menu or popup menu). Basically all you have to do is capture right click mouse events for each from you want a context menu for. You then create your wxMenu in that event handler just like any other menu then call wxWindow::PopupMenu() to make it ...
by eco
Wed Mar 23, 2005 8:03 am
Forum: General Development
Topic: wxToolBar, XRC: PNG Problems
Replies: 2
Views: 1246

Try out this tip from the Remarks section of the wxToolBar documentation . Remarks You may also create a toolbar that is managed by the frame, by calling wxFrame::CreateToolBar. Due to the use of native toolbars on the various platforms, certain adaptions will often have to be made in order to get o...
by eco
Tue Mar 15, 2005 10:32 am
Forum: C++ Development
Topic: std::list<wxWindows*>::iterator
Replies: 2
Views: 986

Are you using a regular iterator (rather than a const_iterator) in a const member function on a member list?
by eco
Mon Mar 14, 2005 6:54 am
Forum: General Development
Topic: PNG Icons
Replies: 4
Views: 2092

I use PNGs with an alpha channel for icons just fine. Normally I embed the PNG directly in my source (kind of like an XPM) but you could load straight from a file. wxWidgets handles the alpha very well, particularly in the 2.5.x series. Now, if you mean an actual Windows icon (a .ico file), they don...
by eco
Sun Mar 13, 2005 11:15 am
Forum: C++ Development
Topic: [SOLVED] Memory leaks!
Replies: 10
Views: 2040

When possible, put constants on the left side of the == (i.e. if(1 == x) rather than if(x == 1)). That way if you don't put enough = signs in your equality tests it'll throw a compiler error, rather than introduce a logic error. I don't really do it myself but I hear it helps a lot of people :).
by eco
Sat Mar 12, 2005 7:54 pm
Forum: C++ Development
Topic: [SOLVED] Memory leaks!
Replies: 10
Views: 2040

I think we've all done that one before :).
by eco
Fri Mar 04, 2005 11:45 pm
Forum: C++ Development
Topic: wxString to wxDateTime
Replies: 4
Views: 1489

You're looking for wxDateTime::ParseDate(). There are other Parse functions as well (ParseDateTime() and ParseFormat() being particularily useful).
by eco
Wed Mar 02, 2005 9:36 am
Forum: C++ Development
Topic: wxSplitterWindow in a wxSplitterWindow
Replies: 4
Views: 1200

I used to have this setup. I've since changed it in my app but I don't recall any refresh problems.
by eco
Wed Mar 02, 2005 8:31 am
Forum: C++ Development
Topic: Drawing and wxScrolledwindow
Replies: 14
Views: 3623

I've never had to set either to anything other than what they are by default. Also, I just read that Julian (very timely) has just fixed wxBufferedPaintDC to work with wxScrolledWindow (he commited the fix like 2 minutes ago). So it looks like we can finally use the much simpler wxBufferedPaintDC in...
by eco
Wed Mar 02, 2005 2:57 am
Forum: C++ Development
Topic: Drawing and wxScrolledwindow
Replies: 14
Views: 3623

I had the exact same problem. I did solve it...let me dig up the code... Ok, first I capture OnErase and do nothing. Then I do something like this for my onPaint(): { wxPaintDC dc(this); int view_width, view_height; GetClientSize(&view_width, &view_height); int scrollPosX, scrollPosY; GetViewStart(&...