Search found 86 matches
- Fri Feb 05, 2010 3:31 am
- Forum: C++ Development
- Topic: how can I convert const wchar_t* to const char*
- Replies: 3
- Views: 2098
Hi,try this! char* wx2char( char* cstring,const wxString& wxstr,const wxMBConv& conv ) { cstring = (char*)malloc( sizeof(char)*( strlen( (char*)(wxstr.mb_str(conv).data()) )+1 ) ); return strcpy(cstring, (const char*)wxstr.mb_str(conv)); } and the conv I set to wxConvUTF8. My project charset is unic...
- Fri Feb 05, 2010 3:26 am
- Forum: C++ Development
- Topic: how to remove the file to trash?
- Replies: 12
- Views: 3029
how to remove the file to trash?
Hi, guys!
Is there a way to remove the file to trash?(Windows && MacOS)
Waiting for your reply.....
Is there a way to remove the file to trash?(Windows && MacOS)
Waiting for your reply.....
- Fri Dec 25, 2009 9:15 am
- Forum: C++ Development
- Topic: unicode build : wxString and std::wstring
- Replies: 3
- Views: 1219
bool UTF82WC( const std::string & source , std::wstring & outstr ) { wxMBConvUTF8 conv; size_t nRealSize; wxWCharBuffer theBuffer = conv.cMB2WC( source.c_str() , source.size() , &nRealSize ); if( nRealSize ) { outstr.assign( theBuffer.data() , nRealSize ); return true; } else { return false; } } bo...
- Tue Nov 10, 2009 6:40 am
- Forum: C++ Development
- Topic: wxDataViewCtrl problem (wxWidgets-2.9.0)
- Replies: 0
- Views: 423
wxDataViewCtrl problem (wxWidgets-2.9.0)
Hi everyone! I download the latest Source Archives,and complied it. and I found a strange thing in the dataview demo. dataview.cpp m_ctrl[1]->AppendTextColumn("editable0", 0, wxDATAVIEW_CELL_EDITABLE, 120); m_ctrl[1]->AppendTextColumn("editable1", 1, wxDATAVIEW_CELL_EDITABLE, 120); m_ctrl[1]->Append...
- Fri Jul 17, 2009 4:00 am
- Forum: C++ Development
- Topic: wxBufferedPaintDC and SetUserScale possible?
- Replies: 2
- Views: 685
- Fri Jul 17, 2009 3:57 am
- Forum: C++ Development
- Topic: who can explain this for me?(Big Image To Draw)
- Replies: 10
- Views: 2312
- Fri Jul 03, 2009 10:14 am
- Forum: The Code Dump
- Topic: Multithreaded GUI thread2 sample
- Replies: 2
- Views: 7484
- Fri Apr 17, 2009 6:12 am
- Forum: C++ Development
- Topic: Why wxBufferedPaintDC doesn't work ?
- Replies: 11
- Views: 3469
- Wed Apr 15, 2009 9:58 am
- Forum: C++ Development
- Topic: when Scale the image,the program will be crash!!!!
- Replies: 6
- Views: 1173
I have another way to scale the image. Thanks sis! bool ScaleImageByDC( const wxImage* pImg,double xScale,double yScale,wxBitmap& destBitmap ) { if (!pImg || !pImg->IsOk()) { return false; } size_t ow = pImg->GetWidth(); size_t oh = pImg->GetHeight(); destBitmap = wxBitmap( ow*xScale,oh*yScale ); wx...
- Wed Apr 15, 2009 5:24 am
- Forum: C++ Development
- Topic: when Scale the image,the program will be crash!!!!
- Replies: 6
- Views: 1173
- Tue Apr 14, 2009 10:23 am
- Forum: C++ Development
- Topic: Setting an icon in the titlebar? - Windows XP
- Replies: 4
- Views: 1201
- Tue Apr 14, 2009 2:14 am
- Forum: C++ Development
- Topic: when Scale the image,the program will be crash!!!!
- Replies: 6
- Views: 1173
Can you show precisely what happens, i.e. a debugger trace? And mention your platform, wx version, etc. the pImg->IsOK() is true; wxWidgets version is 2.8.10, OS is WindowsXP Physical memory is 2048M I was in DEBUG . And the image I have upload, you can download it. http://www.go2upload.com/file/3/...
- Mon Apr 13, 2009 2:43 am
- Forum: C++ Development
- Topic: Converting wxString
- Replies: 8
- Views: 2305
hi ,try this ! In Unicode build
Code: Select all
wxString str=_T("Hello world!");
char* szDesPath = ( char*)malloc(sizeof( char)*(strlen(( char*)(str.mb_str(wxConvFile).data()))+1));
strcpy( szDesPath,( char*)(str.mb_str(wxConvFile).data()));
- Mon Apr 13, 2009 2:17 am
- Forum: C++ Development
- Topic: when Scale the image,the program will be crash!!!!
- Replies: 6
- Views: 1173
when Scale the image,the program will be crash!!!!
the code is here: (In Unicode build) if( pImg->IsOK() ) m_Image = pImg->Scale(w,h); //the program will be crash,it was shown in Scale fun,line 495,in the image.cpp the size of pImg is 40000*2111, and the w,h is ( 146,8 ) when the w,h is (3000,2000),the program is ok, Is the size too small to scale? ...
- Sun Mar 22, 2009 9:08 am
- Forum: C++ Development
- Topic: who can explain this for me?(Big Image To Draw)
- Replies: 10
- Views: 2312