Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7432849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:31:23+00:00 2026-05-29T09:31:23+00:00

I have an wxWidget application built using C++. One of the functionalities of the

  • 0

I have an wxWidget application built using C++. One of the functionalities of the application is that it prompts the user to enter a string in a message box and then once users presses Enter, it creates a file with the name of the file being the string array user entered.

Now I have an issue, I want to check if the string entered by the user can be a valid name or not**.

  1. one way is to check if the file has been created on the system and tell the user it is an invalid string.(I dont want to do this).

  2. another would be to parse the entire string to check if it has invalid file name characters like <, /, \ etc in the string.

Is there any other way I can check this which doesn’t involve any file operations?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:31:24+00:00Added an answer on May 29, 2026 at 9:31 am

    You could use the static function:

    static wxString wxFileName::GetForbiddenChars(wxPathFormat format = wxPATH_NATIVE)
    

    to get a list of invalid characters to match against your string. You can see its documentation here. Although it wont rule out all invalid filenames, it might be good enough for what you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have built an application using wxWidgets in C++ and use wxToolTips to provide
I have a command-line application written in C++ and built with gcc/make that runs
I have a small wxWidget application that uses image files at several places. I
I have an application that uses wxWidgets as a the UI framework and compiled
I have an application that uses Flash for the GUI and Python for the
I have a closed-source Linux application that I want to distribute. This application is
I have an application that I want add some cool animations to show state
Background: I have an application written in native C++ which uses the wxWidgets toolkit's
Is it easy to create an IPC setup with wxWidgets? I have an application
I'm building a UI using wxWidgets in windows platform with C++. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.