Search found 203 matches

by eco
Mon Nov 07, 2005 3:04 am
Forum: C++ Development
Topic: WxPropGrid -> cannot access wxString-object
Replies: 2
Views: 1061

This error happens when a wxString is being implicitly cast to an integer. Make sure no argument expects an integer but is recieving a wxString.
by eco
Fri Nov 04, 2005 1:48 am
Forum: C++ Development
Topic: Problems executing an application on win32 compiled unicode
Replies: 7
Views: 3994

A stack trace would certainly be helpful.
by eco
Fri Nov 04, 2005 1:43 am
Forum: C++ Development
Topic: destruction of sub-class
Replies: 4
Views: 1470

If you define a sub-object as an object with a parent which owns the object then yes, wxWidgets will almost always handle deletion for you. An object that is simply a member of another object does not fit this criteria. Generally with wxWidgets it will automatically delete objects that you've specif...
by eco
Wed Nov 02, 2005 9:45 pm
Forum: C++ Development
Topic: Converting Unicode wxString to UTF-8
Replies: 8
Views: 1890

It should be OK actually. std::string and wxString are just a bunch of bytes and don't check for zeros etc. so you should be ok with any encoding as long as you remember to explicitly specify the length. And UTF-8 doesn't really contain \0's in strings, it is used for specifying the end of a string...
by eco
Wed Nov 02, 2005 12:51 am
Forum: C++ Development
Topic: Commands to printer
Replies: 1
Views: 839

I don't believe wxWidgets has support to send raw printer commands directly. If you're on Windows I think WriterPrinter is what you are looking for (the Code Project also has an article that looks like it may be of at least some use). You'll have to figure out the raw printer command methods yoursel...
by eco
Wed Nov 02, 2005 12:28 am
Forum: C++ Development
Topic: Printing Framework
Replies: 3
Views: 1683

If the printer is actually turning off I'd suspect it was a driver issue rather than an issue with your code.
by eco
Wed Nov 02, 2005 12:25 am
Forum: C++ Development
Topic: Converting Unicode wxString to UTF-8
Replies: 8
Views: 1890

It's actually wxString::mb_str(), rather than wxString::mbstr(). Also, you should probably be specifying the target encoding like so:

Code: Select all

const char* s = node.mb_str(wxConvUTF8);
And std::string has no concept of UTF-8 so I'd recommend avoiding stuffing a UTF-8 string in one.
by eco
Wed Oct 12, 2005 11:38 pm
Forum: General Forum Issues
Topic: Annoying popups
Replies: 9
Views: 3689

Still getting them :(. The ones I'm getting are particularly obnoxious because they aren't actually pop-up/-under windows but pseudo-windows embedded in the page itself. Certainly there has to be a better third-party monitoring service or, even better, a local monitoring solution like those suggeste...
by eco
Tue Oct 11, 2005 1:43 am
Forum: C++ Development
Topic: Create problem
Replies: 3
Views: 1209

candid_1120 wrote:if I don't delete the pointer ,can wxWidgets to free it automaticly?
If it has a parent or is a top-level window that lets its Close() destroy the window.
by eco
Tue Oct 11, 2005 1:37 am
Forum: C++ Development
Topic: When to use delete
Replies: 3
Views: 895

You should use Destroy() (g_pGLCanvas->Destroy()) for objects derived from wxEvtHandler (it prevents lingering events from being processed using a non-existent event handler). Also, since your wxGLCanvas is most certainly a child of another wxWindow or wxWindow derived class you can safely not do an...
by eco
Tue Aug 16, 2005 7:22 pm
Forum: C++ Development
Topic: Text in a StatusBar aligned left/right/center
Replies: 1
Views: 1450

I know of no way to change the alignment with the standard wxStatusBar. You'll probably need to derive a new class from wxStatusBar. In the OnSize for this new class use GetFieldRect to position and size a left/right/center aligned wxStaticText (and remember to Skip() the event). Create a new functi...
by eco
Tue Aug 09, 2005 11:22 am
Forum: C++ Development
Topic: Any way to set font for Window and its children?
Replies: 7
Views: 2094

Oh, forgot to mention that is only if you want to do it after the parent window and children have been created. If you SetFont() (like vdell said) before you create the children, they will inherit the font. Someone correct me if I'm wrong on this (I've always assumed this is what the docs where tryi...
by eco
Tue Aug 09, 2005 11:18 am
Forum: C++ Development
Topic: Any way to set font for Window and its children?
Replies: 7
Views: 2094

Something like this will probably do the trick: std::stack<wxWindow*> window_stack; window_stack.push(parent_window); while(!window_stack.empty()) { wxWindow* current = window_stack.top(); window_stack.pop(); current->SetFont(font); wxWindowList list = parent_window.GetChildren(); for(WindowList::No...
by eco
Wed Jun 29, 2005 11:00 pm
Forum: General Development
Topic: wxWidgets 2.6.1 License changes: Commerical Devs beware?
Replies: 5
Views: 1568

This has been dicussed ad nauseum on the wx-dev mailing list. See the archives if you want to know more about it.
by eco
Fri Jun 10, 2005 12:39 am
Forum: C++ Development
Topic: Page margins problem!
Replies: 2
Views: 756

You can get it in millimeters from wxPageSetupDialogData. I don't know of a "pixel" perfect way.