Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i need to know how in MFC Dialouge based
i can save file by selecting path on clicking button as
if(fileDlg.DoModal() == IDOK)
{
	std::ofstream file;
	file.open(fileDlg.GetFileName(),std::ios::out);
	if (file !=  NULL)
	{
		file << (*assembly);
		file.close();
	}
}


here fileDlg.GetFileName used what to do do i can save my file at selected path
after selecting path and given file name in dialouge Save button not apper ioen button appear Regards
Posted
Updated 5-Jun-14 21:35pm
v2

1 solution

read the CFileDialog documenation.

My guessing is that you need

CFileDialog dlg(FALSE, ...);//FALSE => opens as save dialog
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900