The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Cancel FindFiles

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
peter.cook Posted - 05/30/2006 : 08:57:45 AM
Origin Version (Select Help-->About Origin): Origin 7.5SR6
Operating System: Win2000

Hi,

I'm using FindFiles to list all files of a particular type in a folder but one problem is that when I/users click 'Cancel' it still returns all the file types.

I use eg

FindFiles(AllFiles, PathBuffer, "xls");
AllFiles.Sort();
int NumPlates=AllFiles.GetSize();
int NumFiles=NumPlates;

How can I trap when the dialog is cancelled / closed without pressing OK?

Cheers,

pete

Edited by - peter.cook on 05/30/2006 09:04:06 AM
3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 05/30/2006 : 11:41:43 AM
Might be easier since it returns the path as string. Then use if( strPath.IsEmpty() ) return.

Mike Buess
Origin WebRing Member
peter.cook Posted - 05/30/2006 : 11:12:34 AM
Hi Mike,

I was of course writing nonsense. I used getfile to select a file - this crashes out if I select cancel...should I be using GetOPenBOx then?

Cheers,

Pete

Mike Buess Posted - 05/30/2006 : 09:43:43 AM
Hi Pete,

FindFiles does not generate a dialog so you must have asked for the extension earlier in your code.

Mike Buess
Origin WebRing Member

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000