Search found 79 matches

by Marcus Frenkel
Mon Jan 11, 2010 10:25 am
Forum: C++ Development
Topic: wxRichTextCtrl force no scrollbars
Replies: 2
Views: 1124

Great, thx!
by Marcus Frenkel
Sun Jan 10, 2010 3:58 pm
Forum: C++ Development
Topic: wxRichTextCtrl force no scrollbars
Replies: 2
Views: 1124

wxRichTextCtrl force no scrollbars

Is there any way of forcing wxRichTextCtrl to never display scrollbars, not even when the page is larger than the window.

Something like wxHW_SCROLLBAR_NEVER style available in wxHtmlWindow.

Thx, Marcus
by Marcus Frenkel
Tue Dec 22, 2009 12:15 pm
Forum: C++ Development
Topic: Is const wxString thread-safe?
Replies: 1
Views: 606

Is const wxString thread-safe?

Hi, Can a global const wxString be safely used in multiple threads? In example: app.h: const wxString somestr = wxT("text"); app.cpp //Thread 1: wxString tempStr = wxT("some text"); if (somestr == tempStr )... //Thread 2: wxString tempStr = wxT("some text"); if (somestr == tempStr)... Thx, Marcus
by Marcus Frenkel
Fri Dec 11, 2009 9:35 am
Forum: C++ Development
Topic: wxHTML & wrap too long words
Replies: 0
Views: 416

wxHTML & wrap too long words

Hi, I use wxHTML for my simple html needs. wxHTML wraps too long lines in a table cell just fine. However, it breaks the line in the space between words only, it never brakes the word no matter how long is the word. This produces ugly results in the layout. Maybe someone already needed the same word...
by Marcus Frenkel
Tue Dec 08, 2009 3:49 pm
Forum: C++ Development
Topic: wxTimer issue on wxWidgets 2.9.0
Replies: 5
Views: 2892

Hi Marcus, Perhaps you have the same problem as I did here . Do you create your timer statically? Regards, David Something like that. I was creating wxTimer on a stack. After I saw your ticket submission I tried to create on the heap and it's ok now. What's funny, creating it on a stack doesn't wor...
by Marcus Frenkel
Tue Dec 08, 2009 2:13 pm
Forum: C++ Development
Topic: wxTimer issue on wxWidgets 2.9.0
Replies: 5
Views: 2892

wxTimer issue on wxWidgets 2.9.0

Hi, I just switched to wxWidgets 2.9.0 from 2.8.8, the same application I made compiles fine but when I run it complains about the timer I use with error message: ..\..\src\common\timercmn.cpp: assert "Assert Failure" failed in wxTimer::Init(): No timer implementation for this platform So the timer ...
by Marcus Frenkel
Thu Nov 12, 2009 1:34 pm
Forum: C++ Development
Topic: Disconnect all event handlers defined with Connect
Replies: 2
Views: 907

Disconnect all event handlers defined with Connect

I'm creating controls in a loop and connecting them with event handler, ie: wxPopWin::wxPopWin(wxWindow *parent, long style):wxPopupTransientWindow( parent, style ){ for (;;) { /// some more code here SomeCtrl * tmpSomeCtrl = new SomeCtrl( this, wxID_ANY); tmpSomeCtrl->Connect( wxEVT_LEFT_UP, wxMous...
by Marcus Frenkel
Tue Oct 20, 2009 12:05 pm
Forum: C++ Development
Topic: PopupMenu bottom up
Replies: 1
Views: 420

Just noticed that even though Visual C++ IDE shows me GetWindow as inherited member of wxMenu, and compiles fine, it is not inherited member according to the docs.

That's the reason for the crash.

It seems that the size of the popup menu cannot be determined?
by Marcus Frenkel
Tue Oct 20, 2009 11:41 am
Forum: C++ Development
Topic: PopupMenu bottom up
Replies: 1
Views: 420

PopupMenu bottom up

Normally PopupMenu with wxDefaultPosition will show the top of the menu at the cursor's position. What I need is to show the bottom of the menu at the cursor's position. I tried to calculate the size of the menu in order to set the precise y position, but it causes crash (perhaps bcs the menu is not...
by Marcus Frenkel
Mon Oct 19, 2009 9:09 pm
Forum: C++ Development
Topic: Style flags issue
Replies: 4
Views: 968

I still struggle with this "phenomena". I use MS Visual Studio 2008. Can someone replicate this behaviour. Problem is that EXAMPLE 1 which uses dialog specific flags doesn't give proper results. // EXAMPLE 1 long fl = wxFORWARD ; wxString btn; if ( fl & wxYES) btn += wxT("Yes"); if ( fl & wxFORWARD ...
by Marcus Frenkel
Sun Oct 18, 2009 2:13 pm
Forum: C++ Development
Topic: Style flags issue
Replies: 4
Views: 968

Style flags issue

Hi, I have a strange issue when using bitwise operators to test the presence of a flag. EXAMPLE 1: long myflags = wxFORWARD; if ( myflags & wxYES) //RETURNS TRUE if ( myflags & wxFORWARD ) //RETURNS TRUE EXAMPLE 2: long myflags = wxTC_RIGHT ; if ( myflags & wxTC_RIGHT ) //RETURNS TRUE if ( myflags &...
by Marcus Frenkel
Tue Jun 30, 2009 1:01 am
Forum: C++ Development
Topic: wxMessageQueue for Inter-thread communication
Replies: 3
Views: 1089

you could use std::array or std::vector instead of a naked array. If you must use a POD-Array, try wxMessageQueue<std::string*> instead. I wanted to go with std::array but it's header is not included in VC++ 2008. I tried to go with simple arrays to avoid the noticeable overhead of using vectors. U...
by Marcus Frenkel
Fri Jun 26, 2009 10:10 am
Forum: C++ Development
Topic: wxMessageQueue for Inter-thread communication
Replies: 3
Views: 1089

wxMessageQueue for Inter-thread communication

Hi, I tried the new class wxMessageQueue for inter thread communication that will be available in the next wxWidgets release. Since it is a template it can be used to send arbitrary user data. I tried it with std::string and it works fine, however it doesn't work with std::string array. I wonder if ...
by Marcus Frenkel
Mon Jun 22, 2009 5:09 pm
Forum: C++ Development
Topic: Using event to send data to the main thread
Replies: 9
Views: 1394

wxWidgets will not do any calls on this pointer (anyway it couldn't, since it receives a void*). So all calls to this pointer are yours. So as long as you are careful not to concurrently call stuff that isn't thread-safe on this in your code, yes it is I was thinking about this scenario: 1) An obje...
by Marcus Frenkel
Sun Jun 21, 2009 11:00 pm
Forum: C++ Development
Topic: Using event to send data to the main thread
Replies: 9
Views: 1394

One last consideration.

When using event.SetClientData we pass a pointer to the main thread for an object created in a secondary thread. Is this thread safe as much as event.SetString ?

Thanks!
Marcus