Archived

This topic is now archived and is closed to further replies.

GaMe wIg

File Listing...

Recommended Posts

elis-cool    271
To get all the files in a Dir you use the FindFirstFile() and FindNextFile() functions, look them up on msdn, and to open the standard dialog you use the getopenfilename()\getsavefilename() functions... eg heres some source riped striaght out of my current project
  
OPENFILENAME ofn;
char szFile[300] = {''\0''};

ZeroMemory(&ofn, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = App.CWindows.hMain;;
ofn.lpstrFile = szFile;
ofn.nMaxFile = sizeof(szFile);
ofn.lpstrFilter = "NewsAgent Project *.prj\0*.prj\0All *.*\0*.*\0";
ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = 0;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;

if(!GetOpenFileName(&ofn)) break;

Share this post


Link to post
Share on other sites