Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Need help Urgent

Need help Urgent

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    reddy harish
    wrote on last edited by
    #1

    Iam developing a dialog based application in which user has to select a file to continue for next step.There he needs to enter the file with correct extension,so i have to validate the file extensions which he has provided. he needs to enter different files in different steps. how can i validate the file extensions he has provided is correct or wrong. so that he can go for the next operation.

    C _ H 3 Replies Last reply
    0
    • R reddy harish

      Iam developing a dialog based application in which user has to select a file to continue for next step.There he needs to enter the file with correct extension,so i have to validate the file extensions which he has provided. he needs to enter different files in different steps. how can i validate the file extensions he has provided is correct or wrong. so that he can go for the next operation.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      'need help urgent' is hardly a descriptive subject. You can use the Substring method of CString to check if the file extension is what you hoped, and you can set a file selection dialog to only allow selection of existing files.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      1 Reply Last reply
      0
      • R reddy harish

        Iam developing a dialog based application in which user has to select a file to continue for next step.There he needs to enter the file with correct extension,so i have to validate the file extensions which he has provided. he needs to enter different files in different steps. how can i validate the file extensions he has provided is correct or wrong. so that he can go for the next operation.

        _ Offline
        _ Offline
        _AnsHUMAN_
        wrote on last edited by
        #3

        reddy harish wrote:

        validate the file extensions

        You can take the file name and check it with the files existing in the directories using FindFirstFile(),FindNextFile() API's.YOu can also check for the extension using these API's

        Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

        1 Reply Last reply
        0
        • R reddy harish

          Iam developing a dialog based application in which user has to select a file to continue for next step.There he needs to enter the file with correct extension,so i have to validate the file extensions which he has provided. he needs to enter different files in different steps. how can i validate the file extensions he has provided is correct or wrong. so that he can go for the next operation.

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          You can use CFileDialog

          _**


          **_

          WhiteSky


          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups