If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > VC++ 6.0, save command

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-29-03, 16:42
calculus87 calculus87 is offline
Registered User
 
Join Date: Sep 2003
Posts: 23
VC++ 6.0, save command

Hello,
This is what I would like to do. I would like to make a save command. I would like it to look just like the one in Microsoft word when you click on the "save as" button. This is the code that I have, but it is for the open command, not the save command. I would like to know what the key words for the save as command are.
Thank you very much for your time.
Ronald

void CTry4Dlg::OnButton4()
{
OPENFILENAME ofn = {0};
char szName[MAX_PATH];
*szName = 0;
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = AfxGetApp()->m_pMainWnd->m_hWnd;
ofn.lpstrFilter = NULL;
ofn.lpstrFilter = "Text files (*.txt)\0*.txt\0All files (*.*)\0*.*\0";
ofn.lpstrCustomFilter = NULL;
ofn.nFilterIndex = 1;
ofn.lpstrFile = &szName[0];
ofn.nMaxFile = MAX_PATH;
ofn.lpstrInitialDir = m_DefaultDir;
ofn.lpstrTitle = "Open Text File";
ofn.lpstrFileTitle = NULL;
ofn.lpstrDefExt = "TXT";
ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_EXPLORER;

if (GetOpenFileName(&ofn))
transfile1= ofn.lpstrFile;
CEdit* pEditShow = (CEdit*)GetDlgItem(IDC_EDIT4);
pEditShow->SetWindowText(transfile4);
}
__________________
This message is a natural product made from recycled electrons. The slight
variations in spelling and grammar enhance its individual character and
beauty and in no way are to be considered flaws or defects.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On