Avoiding the sys dlg

This is a discussion on Avoiding the sys dlg within the Windows Programming forums, part of the Platform Specific Boards category; Bonjour! I'm using the code ..... Code: if(FindFirstFile("a:\*.*", &fd)!=INVALID_HANDLE_VALUE){ .... .... }else{ cout<<"Please insert disk-1"<<endl; } .... to check whether ...

  1. #1
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    386

    Avoiding the sys dlg

    Bonjour!

    I'm using the code .....

    Code:
    if(FindFirstFile("a:\\*.*", &fd)!=INVALID_HANDLE_VALUE){
      ....
      ....
    }else{
      cout<<"Please insert disk-1"<<endl;
    }
    .... to check whether the floppy disk is inserted into the drive. But when a disk is not available, systemís "Insert disk" dialog box also executes with my error message. Is there a way to prevent the system's dialog being displayed?

    Merci.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Another problem with your code is that you don't store the handle returned by FindFirstFile which you should call FindClose on.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Factorial
    By foxman in forum Contests Board
    Replies: 27
    Last Post: 07-11-2008, 07:59 PM
  2. passing value from one dlg to another
    By mr_empty in forum Windows Programming
    Replies: 27
    Last Post: 11-29-2007, 04:25 AM
  3. howto add sys call using modules only ?
    By pinkeshzaveri in forum Linux Programming
    Replies: 1
    Last Post: 08-23-2005, 01:28 PM
  4. Memory-Resident programs and Sys files
    By Powerfull Army in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 09-15-2002, 10:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21