Search found 17 matches
- Wed Aug 25, 2010 2:30 pm
- Forum: C++ Development
- Topic: Directory recursivity - Delete/copy/move a whole tree
- Replies: 7
- Views: 2506
I finally got things to work! The code is far from optimal/proper, but it does the job for now based on my needs! Here is the code if anyone ends up on this page after a search and needs a starting point! bool copyTree( wxFileName* source, wxFileName* destination ) { // Copy file if it isn't a direc...
- Wed Aug 25, 2010 11:47 am
- Forum: C++ Development
- Topic: Directory recursivity - Delete/copy/move a whole tree
- Replies: 7
- Views: 2506
David/Auria, as we discussed on IRC yesterday, I still have problems making this work :( If I put a breakpoint at the beginning of the function and follow it line-by-line, it will always go in the else instruction of the DirExists condition. When I do that, I also see that copyTree gets called infin...
- Tue Aug 24, 2010 6:56 pm
- Forum: C++ Development
- Topic: Directory recursivity - Delete/copy/move a whole tree
- Replies: 7
- Views: 2506
- Tue Aug 24, 2010 3:29 pm
- Forum: C++ Development
- Topic: Directory recursivity - Delete/copy/move a whole tree
- Replies: 7
- Views: 2506
Thanks for the help David! Here is what I tried to come up with for the copy version: bool copyTree( wxFileName* source, wxFileName* destination ) { // Copy file if it isn't a directory. if ( ! source->IsDir() ) { if ( ! wxCopyFile(source->GetFullPath(), destination->GetPath(wxPATH_GET_VOLUME | wxPA...
- Mon Aug 23, 2010 1:32 pm
- Forum: C++ Development
- Topic: Directory recursivity - Delete/copy/move a whole tree
- Replies: 7
- Views: 2506
Directory recursivity - Delete/copy/move a whole tree
Hi, I'm looking to delete a whole directory (including all it's subdirectories and files), though I might need to do copy/move operations in the same manner. I'm using 2.8, and I was told that wxRmdir isn't recursive under this version, in other words the directory to remove needs to be empty. So I'...
- Fri Aug 20, 2010 12:49 pm
- Forum: C++ Development
- Topic: Output wxInputStream in console
- Replies: 9
- Views: 2176
- Thu Aug 19, 2010 11:34 am
- Forum: C++ Development
- Topic: Output wxInputStream in console
- Replies: 9
- Views: 2176
- Thu Aug 19, 2010 11:15 am
- Forum: C++ Development
- Topic: Output wxInputStream in console
- Replies: 9
- Views: 2176
- Wed Aug 18, 2010 7:40 pm
- Forum: C++ Development
- Topic: Output wxInputStream in console
- Replies: 9
- Views: 2176
- Wed Aug 18, 2010 1:27 pm
- Forum: C++ Development
- Topic: Output wxInputStream in console
- Replies: 9
- Views: 2176
- Wed Aug 18, 2010 12:10 pm
- Forum: C++ Development
- Topic: Output wxInputStream in console
- Replies: 9
- Views: 2176
Output wxInputStream in console
The following code runs ok: wxProcess externalProcess; wxInputStream *consoleOutput; externalProcess.Redirect(); externalProcess.Open(wxT("psgetsid.exe Administrator"), wxEXEC_ASYNC); consoleOutput = externalProcess.GetInputStream(); But when I try to read the program output with the follo...
- Mon Aug 09, 2010 6:49 pm
- Forum: C++ Development
- Topic: WxString conversion question.
- Replies: 13
- Views: 2950
http://wiki.wxwidgets.org/Converting_ev ... o_wxString ?
Edit: Oops, it was already pointed out. However, if by "char block" you mean char array, well that's what char * is.
Edit: Oops, it was already pointed out. However, if by "char block" you mean char array, well that's what char * is.
- Mon Aug 09, 2010 12:03 pm
- Forum: C++ Development
- Topic: Accents in the console on Windows using unicode build
- Replies: 4
- Views: 1611
Re: Accents in the console on Windows using unicode build
I've tried the different solutions linked, and so far I've only been able to get one to work: using namespace std; #include <string> #include <iostream> #include "wx/string.h" #include "wx/app.h" int main(int argc, char **argv) { wxInitialize(); UINT oldcp = GetConsoleOutputCP();...
- Fri Aug 06, 2010 9:26 pm
- Forum: C++ Development
- Topic: Accents in the console on Windows using unicode build
- Replies: 4
- Views: 1611
Accents in the console on Windows using unicode build
I thought this would help, but it didn't: http://forums.wxwidgets.org/viewtopic.php?t=19525 I'm trying to output words with accents in the console on Windows, I've searched a lot but haven't found a solution for wxWidgets. Here is my code: using namespace std; #include <string> #include <iostream> #...
- Fri Aug 06, 2010 6:52 pm
- Forum: C++ Development
- Topic: Beginner question about wxMemoryBuffer
- Replies: 4
- Views: 1358