Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int BUFSIZE = 1024;
- char buffer[BUFSIZE] = { 0 };
- OPENFILENAME ofns = { 0 };
- ofns.lStructSize = sizeof(ofns);
- ofns.lpstrFile = buffer;
- ofns.nMaxFile = BUFSIZE;
- ofns.lpstrTitle = "Select Directory";
- GetOpenFileName(&ofns);
- std::string directory = buffer;
Add Comment
Please, Sign In to add comment