Skip to main content
gamedev.net
🔒 Locked

File loader

Started by Ataru 1 reply 200+ views
Original Post
Ataru
Ataru
Is there any easy way to create a file loader like the one you find in every windows app? I''m using MSC 6, and I''ve been looking at dialog boxes, but I can''t find a simple way of creating a file loader with them. I''m assuming now that there is no simple way, but before I trudge on I''d like to know from those who have experience. BTW as far as dialogue boxes go, when you''ve made on in your .RC file, how do you go about displaying it, and handling the events from it? Thanks in advance
2Late
2Late
quote:
Original post by Ataru

Is there any easy way to create a file loader like the one you find in every windows app? I''m using MSC 6, and I''ve been looking at dialog boxes, but I can''t find a simple way of creating a file loader with them. I''m assuming now that there is no simple way, but before I trudge on I''d like to know from those who have experience.

BTW as far as dialogue boxes go, when you''ve made on in your .RC file, how do you go about displaying it, and handling the events from it?

Thanks in advance



(Hope I understood you right?)
Look GetOpenFileName and OPENFILENAME-struct from MSDN... Simple. No messing with resources or dlgprocs.

It''s Never 2 Late
ragonastick
ragonastick
Look for the ActiveX control COMDLG32.ocx, it might be what you are looking for, from a visual basic point of view (I don''t know much C/C++) to bring up a File Open menu like the one in notepad, you would type this:

dlg.Filter = "Text Files (*.txt)|*.txt|All files (*.*)|*.*"
dlg.ShowOpen

And the dialog box would come up, then use a line like this:

FileName = dlg.Filename

To get the name of the file they chose.

hth

"I'm going to live for ever. Even if I die trying"
Benjamin Franklin (I think)
Trying is the first step towards failure.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.