现在建了一个document/view的工程,当我点保存的时候,它就直接保存了。我现在希望它能弹出一个文件保存的对话框,让我选择保存文件的文件名和扩展名。应该怎样做,谢谢!
解决方案 »
- 制作添加,删除,批注程序
- Windows的数据结构使用前,为什么要设置结构大小
- 关于回文数的问题
- 请问,想查一个客户端程序,向服务器发送了什么数据包,怎么查啊
- 为什么在窗口打开之前需要发两次WM_SIZE消息
- C#用的编辑器是用的其他公司提供的,谁记得下载地方?
- 要把一个CString赋给CStringArray[0],应该怎么表达?我的代码在里面,编译通过,执行时出错。请大家多多指教。
- 关于xp下调用Native API函数RtlCreateUserThread创建线程的问题
- C++ Primer 是一本什么样的书啊。
- 请教如何用vs的msdn离线文档查看某些函数
- 求C++数据库编程高手帮助
- 关于PC上位机与单片机的并行通信的问题
dlg.DoModal();
改CDialog::SaveAs();
The CDN_FILEOK notification message is sent by an Explorer-style Open or Save As dialog box when the user specifies a file name and clicks the OK button.
{
switch (phdr->code)
{
case CDN_FILEOK:
return SaveAs_OnFileOK (hWnd, (OFNOTIFY *) phdr);
}
return 0;
}函数 SaveAs_OnFileOK 中
MessageBox (hWnd,
TEXT("You cannot save in the folder you specified. Please choose another location."),
TEXT("Save As"), MB_OK | MB_ICONINFORMATION);
nResult = nReturn = 1;可改为OKCancel
dlg.DoModal();
说得没错
CDocument::OnSaveDocument(const char * 0x00f1b524) line 759
CDocument::DoSave(const char * 0x013672f4, int 1) line 319 + 23 bytes
CDocument::DoFileSave() line 269 + 28 bytes
CDocument::OnFileSave() line 247