我在 Edit写了一些东西 然后点一个 button 然后选择目录保存他
然后在打开他到Edit中显示出来~!~!
谁能帮帮忙啊
? 或着加我QQ53752069 给我发个 源码过来参考下~!~!~
然后在打开他到Edit中显示出来~!~!
谁能帮帮忙啊
? 或着加我QQ53752069 给我发个 源码过来参考下~!~!~
解决方案 »
- 在WM_PAINT事件里面画了一个图形,为什么再画一个图形就显示不出来了?
- 如何得到经script执行后的IHTMLDocument2*所指的
- 如何实现在CLISTVIEW中单击记录的一行呢?CLISTCTRL我已经定义好了
- ModifyStyle能修改控件的全部风格吗,如果不能:那哪些不能,为什么
- 如何消灭对话框重影现象
- VC通过ODBC操作数据库问题
- SDK下如何获取ListView中当前选中的项的索引值?
- 想通过远程控制鼠标,请高手指教!
- 如何通过点击一个按扭来改变另一个按扭的颜色,颜色rgb值在text中指定
- MFC 操作Excel时 在非窗口类中进行操作失败
- SOCKET & CWinThread
- IE中显示并响应自定义菜单
sprintf就可以搞定
{
// TODO: Add your command handler code here
CString path;
if (ntxt==0)
{
MessageBox("第一次运行请设置文件保存的文件夹");
LPITEMIDLIST pidlPath;
char pszDplName[MAX_PATH];
BROWSEINFO biFile;
IMalloc *pDllMlc;
biFile.hwndOwner = m_hWnd;
biFile.pidlRoot = NULL;
biFile.pszDisplayName = NULL;
biFile.lpszTitle = "请打开要保存的目的文件夹";
biFile.ulFlags = BIF_RETURNFSANCESTORS;
biFile.lpfn = NULL;
biFile.lParam = NULL;
biFile.iImage = 0;
if(SUCCEEDED(SHGetMalloc(&pDllMlc)))
{
pidlPath=SHBrowseForFolder(&biFile);
if(pidlPath != NULL)
SHGetPathFromIDList(pidlPath,pszDplName);//pszDplName:文件的路径地址
else return;
pDllMlc->Free(NULL);
pDllMlc->Release();
}
path=pszDplName;
path+="\\";
}
CFile Tfile(path+"data.txt", CFile::modeCreate | CFile::modeReadWrite);
Tfile.Write(alldata,alldata.GetLength());
}
inDlg.m_ofn.lpstrTitle = _T("打开需要提取字库的文本");
inDlg.m_ofn.lpstrFile = fileBuffer;/
if (inDlg.DoModal () == IDOK)
{
m_openname=inDlg.GetPathName ();
GetDlgItem (IDC_EDIT1)->SetWindowText(m_openname);///显示路径
}
这样就实现显示了
CString tStr;
/////
if(reg[ws.cr].HaveData==0)
{
MessageBox(" 无数据可保存!");
return;
}
CFileDialog dlg(FALSE,KZM,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,
"荧光数据文件(*."+KZM+")|*."+KZM+"|所有文件(*.*)|*.*||",this);
if(dlg.DoModal()==IDCANCEL)
return;
///////////////
tStr=dlg.GetPathName();
if(file.Open(tStr,CFile::modeCreate|CFile::modeWrite)==0)
{
MessageBox("打文件"+tStr+"失败!","提示",MB_OK+MB_ICONWARNING);
return;
}
//SaveFileText(&file,SS.RegNum);
int i=0;
CString d;
for(i=0;i<2048;i++)
{
d.Format("%d",int(reg[ws.cr].data[i]));
file.WriteString(d+"\n");
}
file.Close();
我的是根据数据画图形 基本上差不多,
CString lj;
CString mStr; CFileDialog dlg(TRUE,KZM,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,
"荧光数据文件(*."+KZM+")|*."+KZM+"|所有文件(*.*)|*.*||",this);
if(dlg.DoModal()==IDCANCEL)
return;
lj=dlg.GetPathName();
CStdioFile file;
if(file.Open(lj,CFile::modeRead)==0)
{
MessageBox("打开文件"+lj+"失败!","警告",MB_OK+MB_ICONWARNING);
return;
}
for(int i=0;i<2048;i++)
{
file.ReadString(mStr);
reg[ws.cr].data[i]=atoi(mStr);
}
file.Close();
reg[ws.cr].HaveData=TRUE;
reg[ws.cr].Showed=TRUE; int sel=m_wndTabBar.GetCurSel();
if(sel==0)
{
//画出图形
CMosView *p0=(CMosView *)m_wndTabBar.GetItemView(0);
//p0->Coordinate();
p0->Showcurve();
//p0->DrawCurve();
}
if(sel==1)
{
CTestListView *p1=(CTestListView *)m_wndTabBar.GetItemView(1);
p1->ShowData();
}