Doublemax is right: the problem are not the spaces. Are the ":" in the filename
How to handle them?
AND/OR:
what exception should i catch to hide any messagebox? i tried "catch(...)" but i still get the error message popup.
Search found 189 matches
- Wed Sep 27, 2023 2:37 pm
- Forum: C++ Development
- Topic: wxRenameFile() and filenames with spaces
- Replies: 11
- Views: 9865
- Wed Sep 27, 2023 2:22 pm
- Forum: C++ Development
- Topic: wxRenameFile() and filenames with spaces
- Replies: 11
- Views: 9865
Re: wxRenameFile() and filenames with spaces
But it still gives me the error.doublemax@work wrote: ↑Wed Sep 27, 2023 2:07 pm Spaces in filenames are only a problem on the command line or as program parameters.
You should not have the start and end quotes here.Code: Select all
wxRenameFile(FileList[i], "\"" + NEW_PATH + "/" + fn + "\"")
- Wed Sep 27, 2023 1:33 pm
- Forum: C++ Development
- Topic: wxRenameFile() and filenames with spaces
- Replies: 11
- Views: 9865
wxRenameFile() and filenames with spaces
I need to move (rename) files in an app which works both on Windows and Linux. I have problems handling filenames with spaces in them. I tried by adding quotes around the new filename, with: wxString fn = wxFileNameFromPath(FileList[i]); wxRenameFile(FileList[i], "\"" + NEW_PATH + &qu...
- Thu Jul 27, 2023 2:26 pm
- Forum: Component Writing
- Topic: How to use wxGraphicContext to draw on a wxBitmap?
- Replies: 2
- Views: 6702
Re: How to use wxGraphicContext to draw on a wxBitmap?
https://docs.wxwidgets.org/trunk/classwx_graphics_context.html#ad7330b5f52ade60e5f42492dc0686e2e Oh... that's the way. Thanks. FWIW: When the background has only little content, i don't think this optimization is worth the effort (yet). Well, the bars needs to be updated the fastest i can, and the ...
- Thu Jul 27, 2023 1:54 pm
- Forum: Component Writing
- Topic: How to use wxGraphicContext to draw on a wxBitmap?
- Replies: 2
- Views: 6702
How to use wxGraphicContext to draw on a wxBitmap?
I'm building a component which shows a vertical bar chart, using wxGraphicContext to get a nice antialiasing. The "draft" works, but it needs some optimization. One of them is to draw the fixed part of the chart (axis, labels, grid, etc) on a bitmap each time the component changes size, an...
- Mon Apr 17, 2023 10:52 am
- Forum: C++ Development
- Topic: adding X days to wxDateTime: how to check what's the max day of the month?
- Replies: 3
- Views: 2016
Re: adding X days to wxDateTime: how to check what's the max day of the month?
wxDateTime::GetNumberOfDays https://docs.wxwidgets.org/trunk/classwx_date_time.html#a1eba7b64affea1f43dda1cb9baf01c96 Isn't amazing my ability to doublecheck the wiki page and missing it both the times? :( Thanks and please take my apologize. Shouldn't it go over to the next/previous month in this ...
- Fri Apr 14, 2023 1:47 pm
- Forum: C++ Development
- Topic: adding X days to wxDateTime: how to check what's the max day of the month?
- Replies: 3
- Views: 2016
adding X days to wxDateTime: how to check what's the max day of the month?
Using a wxDateTime, i need to add (or subtract) a given amount of days to the date, and make it work like a spinner (so, if you go below 1 the day goes to the max, if you go over the max it starts back from 1). How do i check what's the number of days of the current month of the year already set in ...
- Thu Apr 06, 2023 9:05 am
- Forum: C++ Development
- Topic: Questions about wxNow date/time format, and localizing date/time format
- Replies: 3
- Views: 1042
Re: Questions about wxNow date/time format, and localizing date/time format
I have to admit this is the first time I hear about wxNow(). You can check what it does here . I have always used wxDateTime methods for date/time display (those Format...() ones ). Of course, for them to work correctly, your application has to set its wxLocale to what your system has. Eheh, that's...
- Thu Apr 06, 2023 7:53 am
- Forum: C++ Development
- Topic: Questions about wxNow date/time format, and localizing date/time format
- Replies: 3
- Views: 1042
Questions about wxNow date/time format, and localizing date/time format
I'm using wxNow to show the current time on an app and what i get is Thu Apr 6 09:44:00 2023 The time is good, but It's a weird format for me (the Debian PC is set to Italian timezone, language, localization, etc, i'd say). In italian (translation apart) the format should have been Thu 6 Apr 2023 09...
- Fri Mar 17, 2023 3:23 pm
- Forum: Compiler / Linking / IDE Related
- Topic: How to "embed" animated GIFs in the app?
- Replies: 3
- Views: 808
Re: How to "embed" animated GIFs in the app?
Hi, IIUC you are on Linux? Google gives this Thank you. Thanks, I'm usually on Windows, but i can use that utility on Linux, as my app runs on both the OSs. My question is: how do i then pass a static const unsigned char[] as a wxAnimation to the wxAnimationCtrl::SetAnimation() function? Or how can...
- Fri Mar 17, 2023 9:22 am
- Forum: Compiler / Linking / IDE Related
- Topic: How to "embed" animated GIFs in the app?
- Replies: 3
- Views: 808
How to "embed" animated GIFs in the app?
I use wxCrafter ( but this question shouldn't be strictly related to it, so please keep reading ;) ) to build the complex window of my app, and it saves all the bitmaps i use in a "myapp_bitmaps.cpp" file, which is built like this: // This file was automatically generated by wxrc, do not e...
- Tue Mar 14, 2023 3:40 pm
- Forum: C++ Development
- Topic: wxGridBagSizer: moving objects in cells
- Replies: 3
- Views: 508
Re: wxGridBagSizer: moving objects in cells
When you look through wxGridBagSizers methods, there should be everything you need: https://docs.wxwidgets.org/trunk/classwx_grid_bag_sizer.html E.g. SetItemPosition(wxWindow *window, const wxGBPosition &pos) Yes. I looked at the page twice, and missed it twice. Sorry. However, you won't be abl...
- Tue Mar 14, 2023 1:27 pm
- Forum: C++ Development
- Topic: wxGridBagSizer: moving objects in cells
- Replies: 3
- Views: 508
wxGridBagSizer: moving objects in cells
help.jpg This is the layout of a "help screen". The light blue area is a panel containing a wxGridBagSizers, which contains panels (the teal ones). It contains every possible thing to show, but there's never the need to show everything at once. A function determine the "context"...
- Thu Mar 02, 2023 2:09 pm
- Forum: C++ Development
- Topic: Get mouse events at form level without consuming them?
- Replies: 3
- Views: 551
Re: Get mouse events at form level without consuming them?
Sorry for being late at replying here, but had to follow other problems and now i'm back here. I tried, as i already had the FilterEvent function overridden to catch keypresses. So i just added "a branch" to get the mouse related events: ... if (evtType == wxEVT_LEFT_DOWN || evtType == wxE...
- Thu Feb 02, 2023 8:21 am
- Forum: C++ Development
- Topic: Cannot refresh the window when Show/Hide a panel
- Replies: 3
- Views: 1590
Re: Cannot refresh the window when Show/Hide a panel
Usually when resizing the outer frame fixes the layout, just a Layout() call on the topmost sizer will do the trick. But as you're already doing it, there must be something else going on. You could try calling SendSizeEvent() on the outer frame. Ok, i'll try ASAP. Otherwise, I'm not going to debug ...