FileSave Dialog

This is a discussion on FileSave Dialog within the C++ forums, part of the Application Development category; Code: OPENFILENAME ofn; HANDLE hf; char szFile[260]; LPTSTR currentFile; ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = hwnd; ofn.lpstrFile = szFile; ...


Go Back   Scriptasy > Application Development > C++
120 Online Register Projects Products Members List Calendar Today's Posts

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-02-2007, 05:54 PM
Junior Member
 
Join Date: May 2007
Posts: 15
FileSave Dialog

Code:
OPENFILENAME ofn;
                  HANDLE hf;
                  char szFile[260];
                  LPTSTR currentFile;
                      ZeroMemory(&ofn, sizeof(ofn));
                      ofn.lStructSize = sizeof(ofn);
                      ofn.hwndOwner = hwnd;
                      ofn.lpstrFile = szFile;
                      ofn.lpstrFile[0] = '\0';
                      ofn.nMaxFile = sizeof(szFile);
                      ofn.lpstrFilter = "Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0\0";
                      ofn.nFilterIndex = 1;
                      ofn.lpstrFileTitle = NULL;
                      ofn.nMaxFileTitle = 0;
                      ofn.lpstrInitialDir = NULL;
                      ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;         
                      GetOpenFileName(&ofn);
this is very simple FileSave Dialog the File open dialog is almost exactly similar except you use SAVEFILENAME instead of OPENFILENAME structure
__________________
Mouse!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 01:11 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
scriptasy girl by HitmanN

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
W33