Search found 26 matches
- Fri Nov 19, 2010 9:30 am
- Forum: C++ Development
- Topic: Storing both UTF-8 and wchar_t string in wxString
- Replies: 9
- Views: 2574
There was a memory leakage :oops: Old: std::wstring UtfConvertor::String8To16(std::vector<uint8_t> utf8_data) { char * cpUtf8Data = new char[utf8_data.size()]; VectorConvertor::UInt8VectorToCharPointer(utf8_data, cpUtf8Data); return (wxString::FromUTF8(cpUtf8Data)).ToStdWstring(); } New: std::wstrin...
- Thu Nov 18, 2010 11:44 pm
- Forum: C++ Development
- Topic: Storing both UTF-8 and wchar_t string in wxString
- Replies: 9
- Views: 2574
Would these two methods work? std::wstring UtfConvertor::String8To16(std::vector<uint8_t> utf8_data) { char * cpUtf8Data = new char[utf8_data.size()]; VectorConvertor::UInt8VectorToCharPointer(utf8_data, cpUtf8Data); return (wxString::FromUTF8(cpUtf8Data)).ToStdWstring(); } std::vector<uint8_t> UtfC...
- Thu Nov 18, 2010 11:08 pm
- Forum: C++ Development
- Topic: Upgrade from 2.8 to 2.9.1 - Include directories do not match
- Replies: 4
- Views: 1411
If you ever build a wxWidgets application you must have had the libraries. Were you using wxPack or something like that? Yeah, I was using wxPack previously. I think that's why I didn't need to build it before. However, this time I can't use wxPack, because latest version of wxPack does not contain...
- Thu Nov 18, 2010 9:16 pm
- Forum: C++ Development
- Topic: Upgrade from 2.8 to 2.9.1 - Include directories do not match
- Replies: 4
- Views: 1411
- Thu Nov 18, 2010 7:28 pm
- Forum: C++ Development
- Topic: Upgrade from 2.8 to 2.9.1 - Include directories do not match
- Replies: 4
- Views: 1411
Upgrade from 2.8 to 2.9.1 - Include directories do not match
While working with version 2.8 this was my include directory: ($INCDIR28) = C:\Development\Library\wxWidgets-2.8\include After upgrading to version 2.9.1, I changed it like this: ($INCDIR291) = C:\Development\Library\wxWidgets-2.9.1\include I was using "string.h" header file in v2.8, it wa...
- Thu Nov 18, 2010 10:26 am
- Forum: C++ Development
- Topic: Storing both UTF-8 and wchar_t string in wxString
- Replies: 9
- Views: 2574
Yeah, I saw it:
Thank you all for your helps.
Code: Select all
static wxString wxString::FromUTF8(const char * s, size_t len);
- Thu Nov 18, 2010 9:48 am
- Forum: C++ Development
- Topic: Storing both UTF-8 and wchar_t string in wxString
- Replies: 9
- Views: 2574
What I'm trying to do is: Read some string from UTF-8 encoded text file Store it in a wxString object Assign it to a std::wstring in program code Write it back to the file again in UTF-8 format Maybe the file management classes of wxWidgets support saving text in UTF format, but I don't want to such...
- Thu Nov 18, 2010 9:24 am
- Forum: C++ Development
- Topic: Storing both UTF-8 and wchar_t string in wxString
- Replies: 9
- Views: 2574
Thank you for your reply. std::wstring to wxString : http://docs.wxwidgets.org/trunk/classwx_string.html#df6220517c6b2e2305c9af3c5e932afb Achievement #1 wxString to std::wstring : http://docs.wxwidgets.org/trunk/classwx_string.html#cd4ba44e34428aa83cd9922d2933d060 Achievement #3 wxString to UTF-8 ch...
- Wed Nov 17, 2010 11:48 pm
- Forum: C++ Development
- Topic: Storing both UTF-8 and wchar_t string in wxString
- Replies: 9
- Views: 2574
Storing both UTF-8 and wchar_t string in wxString
I want to do the following things with wxString, which of them are possible? Store an std::wstring in it std::wstring mywstr = L"Test"; wxstr.LoadWString(mywstr); Store a UTF-8 string in it std::vector<uint8_t> Utf8StringData; //... wxstr.LoadUtf8Data(Utf8StringData); Export an std::wstrin...
- Wed Sep 09, 2009 8:04 pm
- Forum: Open Discussion
- Topic: Master Boot Record and Partition Lost After Power Failure
- Replies: 1
- Views: 1811
Master Boot Record and Partition Lost After Power Failure
I have a 1TB Maxtor Basics external hard drive. After a power cut, I lost access to the entire data in it; I couldn't see the drive in my computer but the system was slowing down and getting stuck about every 10 seconds periodically. First I tried running CHKDSK.EXE, but it didn't work, it gave the ...
- Sun Aug 23, 2009 4:31 pm
- Forum: wxDev-C++
- Topic: My first wxWidgets code is not working
- Replies: 1
- Views: 2022
My first wxWidgets code is not working
In order to comprehend the working mechanism of wxWidgets, I created a blank projcet and created these files in it: gui.h #ifndef GUI_H #def GUI_H #include <wx/stattext.h> #include <wx/menu.h> #include <wx/textctrl.h> #include <wx/statbox.h> #include <wx/frame.h> #include <wx/statusbr.h> class CFram...
- Thu Aug 13, 2009 8:35 pm
- Forum: C++ Development
- Topic: Problem with Win32 API function MessageBox()
- Replies: 6
- Views: 1460
I'm sorry guys, you were right. It returns a handle, not a pointer to handle. The point I got confused that the official wxWidgets documentation says that the return value is a null pointer. You can view it from this link: http://docs.wxwidgets.org/stable/wx_wxwindow.html#wxwindowgethandle How can I...
- Thu Aug 13, 2009 5:11 pm
- Forum: C++ Development
- Topic: Problem with Win32 API function MessageBox()
- Replies: 6
- Views: 1460
GetHandle() returns a HWND, not HWND* I'm quite sure that it returns HWND*. You can see the discussion about it here . From wxWidgets documentation: wxWindow::GetHandle void* GetHandle() const Returns the platform-specific handle of the physical window. Cast it to an appropriate handle, such as HWN...
- Thu Aug 13, 2009 4:59 pm
- Forum: C++ Development
- Topic: Problem with Win32 API function MessageBox()
- Replies: 6
- Views: 1460
Problem with Win32 API function MessageBox()
This one works with no problem: Code: wxMessageBox(_("Text"), _("Title")); This one has no compile or run-time error but does nothing, no message box is displayed: Code: MessageBox(*(HWND *) KeyloggerFrame::GetHandle(), _("Text"), _("Title"), MB_OK); Have any ...
- Sun Aug 02, 2009 12:57 pm
- Forum: wxDev-C++
- Topic: How to make project files panel visible
- Replies: 2
- Views: 1317
How to make project files panel visible
I accidentally closed a side panel in wxDev-C++ which shows the file and directory structure of the current project. Whatever I tried I couldn't restore it. I did this same accident a few years ago, but I don't remember how I corrected it then. Can anybody show me way to make that panel visible again?