Search found 39 matches

by congminh60
Fri Dec 05, 2014 8:09 pm
Forum: Compiler / Linking / IDE Related
Topic: wxWidgets - Code::Blocks - MacOS Yosemite
Replies: 0
Views: 1201

wxWidgets - Code::Blocks - MacOS Yosemite

I built wxWidgets using command line. I can build and run the wxWidgets sample too (using command line). Then, I am using Code::Blocks to create a simple wxWidgets application, but I get following errors, how can I fix it? -------------- Build: Debug in HelloWx (compiler: GNU GCC Compiler)----------...
by congminh60
Wed Apr 24, 2013 9:30 pm
Forum: C++ Development
Topic: wxRichTextCtrl problem
Replies: 0
Views: 843

wxRichTextCtrl problem

I used wxRichTextCtrl for logging purpose. The following code will check if total number of lines exceed the limit, some lines at the beginning will be removed. int nNumberOfLine = m_txtLog->GetNumberOfLines(); if(nNumberOfLine > LIMIT) { m_txtLog->MoveHome(); m_txtLog->MoveDown(PURGING); m_txtLog->...
by congminh60
Wed Feb 27, 2013 5:13 pm
Forum: C++ Development
Topic: How to destory child window process in show Model Dialog
Replies: 3
Views: 1323

Re: How to destory child window process in show Model Dialog

Is your application multi-threaded?
by congminh60
Wed Feb 27, 2013 5:08 pm
Forum: C++ Development
Topic: how to wxAPPLY in messagebox
Replies: 1
Views: 607

Re: how to wxAPPLY in messagebox

by congminh60
Wed Feb 27, 2013 12:51 am
Forum: C++ Development
Topic: how to convert XML file to .po file
Replies: 1
Views: 902

Re: how to convert XML file to .po file

If you want to do that, you should study about the .PO file format. Basically PO file contains something like this: msgid "Unknown system error" msgstr "Error desconegut del sistema" You can read your XML file and then create the PO files before loaded it into your program. Check this link about the...
by congminh60
Wed Feb 27, 2013 12:31 am
Forum: C++ Development
Topic: multiple calls to wxInitialize/wxUninitialize
Replies: 1
Views: 723

Re: multiple calls to wxInitialize/wxUninitialize

wxInitialize This function is used in wxBase only and only if you don't create wxApp object at all. In this case you must call it from your main() function before calling any other wxWidgets functions. If the function returns false the initialization could not be performed, in this case the library...
by congminh60
Mon Feb 25, 2013 11:17 pm
Forum: C++ Development
Topic: how to solve Grid and textctrlborder shows in panel refresh?
Replies: 3
Views: 1096

Re: how to solve Grid and textctrlborder shows in panel refr

Can you take a picture to show us what happen and what do you want?
by congminh60
Mon Feb 25, 2013 10:36 pm
Forum: C++ Development
Topic: wxTextCtrl GetValue
Replies: 2
Views: 4507

Re: wxTextCtrl GetValue

Hi, txtbox->GetValue() will return the text inside, but it is in wxString data type. Your std::cout line actually print out the pointer of the string. Try this instead: wxMessageBox(txtbox->GetValue()); Or you can convert the wxString to std::string before print it out with std::cout command. Check ...
by congminh60
Thu Feb 21, 2013 7:45 pm
Forum: C++ Development
Topic: Retrieving the sending wxMenuItem from a wxCommandEvent
Replies: 2
Views: 1126

Re: Retrieving the sending wxMenuItem from a wxCommandEvent

I think the answer is no. Maybe you can use Get/SetClientData.

There is no kind of "object sender" like C#.
by congminh60
Thu Feb 21, 2013 7:25 pm
Forum: C++ Development
Topic: Posting event using AddPendingEvent() from boost thread
Replies: 2
Views: 1075

Re: Posting event using AddPendingEvent() from boost thread

In your situation, why don't you create a wxWidgets thread.This wxWidgets thread will get data produced by your boost thread to update your GUI. Hi, We are using AddPendingEvent() to send an event from boost thread to GUI thread. Looks like, even before the current event processing is completed, the...
by congminh60
Thu Feb 21, 2013 6:19 pm
Forum: C++ Development
Topic: wxString cannot hold more than 65536 characters
Replies: 11
Views: 3112

Re: wxString cannot hold more than 65536 characters

Yes doublemax,

As you said, the wxRichTextCtrl is a custom control. I opened a ticket at http://trac.wxwidgets.org/ticket/15057.

Thankyou all for helping me.
by congminh60
Thu Feb 21, 2013 6:03 pm
Forum: C++ Development
Topic: wxString cannot hold more than 65536 characters
Replies: 11
Views: 3112

Re: wxString cannot hold more than 65536 characters

Hi Radek,

After googled about EM_EXLIMITTEXT, I tried to call the following line right after the rich text control is created.

Code: Select all

SendMessage(m_richTxtLog->GetHandle(), EM_EXLIMITTEXT, 0, -1);
But, it's still not working.

I also tried the member function SetMaxLength but same result.
by congminh60
Thu Feb 21, 2013 2:20 am
Forum: C++ Development
Topic: wxString cannot hold more than 65536 characters
Replies: 11
Views: 3112

Re: wxString cannot hold more than 65536 characters

Hi doublemax,

I made some test and found the limit of wxRichTextCtrl is 65536 characters, whether write the whole text at once or write small pieces of text many times.

Thank you for your helping
by congminh60
Thu Feb 21, 2013 1:27 am
Forum: C++ Development
Topic: wxString cannot hold more than 65536 characters
Replies: 11
Views: 3112

Re: wxString cannot hold more than 65536 characters

wxString str = ""; for(int i=0; i<65536; i++) { if(i==65535) str += "B"; else str += "A"; } wxTextFile file("text.txt"); file.AddLine(str); file.Write(); file.Close(); You are right, I can write that string to the text file successfully. So, it is a problem in wxRichTextCtrl. I will try to call the...