Search found 79 matches

by Marcus Frenkel
Fri Nov 05, 2010 12:12 pm
Forum: C++ Development
Topic: wxThread and wxString::FromUTF8
Replies: 4
Views: 1157

While wxString is not thread-safe, the way you're using wxString::FromUTF8 is ok. I thought that multiple threads cannot call the same global function. Since wxString::FromUTF8 is a static function it actually acts as a global function, am I missing something? However, if you use wxCommandEvent, yo...
by Marcus Frenkel
Thu Nov 04, 2010 11:26 am
Forum: C++ Development
Topic: wxThread and wxString::FromUTF8
Replies: 4
Views: 1157

wxThread and wxString::FromUTF8

Hi, In my secondary thread I have a function like this: void Function(std::string & result ) { wxString Result = wxString::FromUTF8( result.c_str() ); wxCommandEvent *event = new wxCommandEvent(wxEVT_COMMAND_MENU_SELECTED,ID_function1); event->SetString(Result); wxQueueEvent(frame, event); } Is it s...
by Marcus Frenkel
Sun Oct 03, 2010 8:24 pm
Forum: C++ Development
Topic: Difference in caret style in wxRichTextCtrl and wxTextCtrl
Replies: 4
Views: 870

catalin wrote:I remember trying to do the same thing once and the only thing that made it change was to change the value of wxRICHTEXT_DEFAULT_CARET_WIDTH in wxW sources. I don't remember what other things I've checked, if any..
Seems like the only way.
by Marcus Frenkel
Thu Sep 30, 2010 10:17 am
Forum: C++ Development
Topic: Append more items at once along with client data
Replies: 8
Views: 1114

why don't you use : wxStringClientData* StringClientData = new wxStringClientData [5000]; as wxStringClientData inherit wxClientData, there is no problem at all. You can add it to you list box : wxStringClientData* clientDatas = new wxStringClientData[count]; ... for (size_t i = 0; i < count; ++i) ...
by Marcus Frenkel
Thu Sep 30, 2010 9:09 am
Forum: C++ Development
Topic: Difference in caret style in wxRichTextCtrl and wxTextCtrl
Replies: 4
Views: 870

evstevemd wrote:code]richTextCtrl->GetCaret()->SetSize(1,1);[/code]
That causes no change in the caret style as well.
by Marcus Frenkel
Thu Sep 30, 2010 8:31 am
Forum: C++ Development
Topic: Append more items at once along with client data
Replies: 8
Views: 1114

StringClientData *StringClientData = new StringClientData [PtrArraySize]; StringClientData[0].SetFoo(x); StringClientData[1].SetFoo(y); StringClientData[2].SetFoo(z); // ... The exact name to call depends on the StringClientData class, of course The class that I want to use is wxStringClientData. I...
by Marcus Frenkel
Wed Sep 29, 2010 1:34 pm
Forum: C++ Development
Topic: Difference in caret style in wxRichTextCtrl and wxTextCtrl
Replies: 4
Views: 870

Difference in caret style in wxRichTextCtrl and wxTextCtrl

Hi, On wxMSW the caret on wxRichTextCtrl has 2px width while on wxTextCtrl it has 1px width. I want to have the caret 1px in width on wRichTextCtrl as well so I tried: richTextCtrl->GetCaret()->SetSize(1,richTextCtrl->GetCaret()->GetSize().GetHeight() ) ; //or wxCaret * caret = new wxCaret(richTextC...
by Marcus Frenkel
Wed Sep 29, 2010 1:00 pm
Forum: C++ Development
Topic: Append more items at once along with client data
Replies: 8
Views: 1114

You can't do this, you'll have to allocate this way : wxClientData *StringClientData = new StringClientData [PtrArraySize]; Don't forget to delete[] it when yon don't need it anymore. How do you assign a value to an element in the array in that case? About deleting the object, if you assign wxClien...
by Marcus Frenkel
Mon Sep 27, 2010 9:45 am
Forum: C++ Development
Topic: Append more items at once along with client data
Replies: 8
Views: 1114

Okay somehow changing wxStringClientData *StringClientData[5000]; to wxClientData *StringClientData[5000]; Made it compiled fine and it seems to work all right I hope it will not end up in some undefined behavior. Another question on this, how do I set the size of wxStringClientData *StringClientDat...
by Marcus Frenkel
Mon Sep 27, 2010 9:32 am
Forum: C++ Development
Topic: Append more items at once along with client data
Replies: 8
Views: 1114

Append more items at once along with client data

Hi, I'm trying to make use of the following function without success: int wxItemContainer::Append(const wxArrayString & items, wxClientData **clientData) http://docs.wxwidgets.org/trunk/classwx_item_container.html#da2c60d0621a4a2d62a50345778e13f3 If I want to add one item to wxSimpleHtmlListBox alon...
by Marcus Frenkel
Tue Jun 01, 2010 11:19 pm
Forum: C++ Development
Topic: Destroy also set NULL ?
Replies: 2
Views: 600

Destroy also set NULL ?

Excuse me for this simple question, I couldn't find the answer in the forum already. When wxWindow or derived class is destroyed is the pointer set to NULL as well. Ex: wxScrolledWindow * scwin = new wxScrolledWindow(...); .. .. scwin->Destroy(); //is scwin nulled after this or scwin=NULL; must be c...
by Marcus Frenkel
Tue May 18, 2010 12:24 pm
Forum: C++ Development
Topic: Suppress internal wxWidgets error dialogs
Replies: 2
Views: 544

Thx I will follow my intuition that this will fix it, since it's hard to reproduce the error right away :)
by Marcus Frenkel
Tue May 18, 2010 10:01 am
Forum: C++ Development
Topic: Suppress internal wxWidgets error dialogs
Replies: 2
Views: 544

Suppress internal wxWidgets error dialogs

Hi,

when I use my app which is compiled against the release build, there is an error "No handler found for image type" which cannot really be reproduced (it happens in 0.01%). I want to suppress that error dialog. How can I do that without changing the wxWidgets source?

Thx, Marcus
by Marcus Frenkel
Tue May 04, 2010 10:22 am
Forum: C++ Development
Topic: wxSimpleHtmlListBox mouse clicks handling
Replies: 0
Views: 327

wxSimpleHtmlListBox mouse clicks handling

Hi, I have wxSimpleHtmlListBox connected with wxMouseEvent for Left Double Click on an item and wxHtmlLinkEvent for the links inside the html of an item. The problem: 1) I have a X image at the end of each item, that represent a button for deleting the list item. 2) When I double click the item it o...
by Marcus Frenkel
Wed Mar 03, 2010 1:51 pm
Forum: C++ Development
Topic: wxAuiNotebook: on tab move page keeps old index
Replies: 1
Views: 503

wxAuiNotebook: on tab move page keeps old index

When I move a tab in AuiNotebook, I would like to change the labels of the tabs so that they show the actual tab position. Example: AuiNotebook ------------ [Tab 1] [Tab 2] [Tab 3] [Tab 4] When I move Tab 3 before Tab 1, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG is fired in which I have: for (int i=0; i < ...