hi, as the titel.The user will input the name of the file and the folder through EDITBOX. m_name is the Variable ,in CStrig. Here is mz code void CFilefindDlg::OnButton1() { // TODO: Add your control notification handler code here HANDLE handle; WIN32_FIND_DATA fd; handle = FindFirstFile(m_name, &fd); if (handle != INVALID_HANDLE_VALUE) AfxMessageBox("Find this folder."); else AfxMessageBox("Could not find folder."); } I dont how to use funktion FindFirstFile().If i write in char path[256]="C:\\guo\\1.txt"; handle = FindFirstFile(path, &fd); It is right. But the name of the file should be decided by the user. How can i do it ?:doh::doh::doh: Thanks!
zhangguoliming
Posts
-
how to find a file in one folder -
How to creat a new folder and a new fileHey, I want to creat a new folder with a new file. Now my code can only creat a new folder but no file.What is the wrong with my code?Please help anyway you can.. Thanks in advance. m_Luting is the name of the folder , type CString m_Name is the name of the file ,type CString My code : char path[300]; CString stname=".bin"; CString cell; CreateDirectory(_T(m_Luting), NULL); strcat(path,m_Luting); strcat(path,m_Name); strcat(path,stname); fstream fMyfile; fMyfile.open(path,ios:out|ios::binary|ios::trunc); if(!fMyfile){ exit(-1);} fMyfile.close();
-
How to save a "MHTML" file as a BMP file?i want to save a file ,which in MHTML ,as a BMP file.How can i do it ? Thanks in advance
-
How to display an Excel Diagram with VC++My job is to write in Excel ,read from Excel and display Diagram .Now i could write and read.I've used EXCEL.EXE from type library function to write/read (Excel.Application, Excel.Workbook,Excel.Sheet...).But i don't know how to display with VC++. I know that it is no easy to do it with VC++.But i have to use VC++ . :confused:
-
How to display an Excel Diagram with VC++I want to display an Excel Diagram on one of my property sheet. I write my programm with VC++6.How can i do it?Could someone help me?:-D and what means LPDISPATCH GetDiagram()?What will i get? Is the value of the diagram ? Or a diagram? Thanks!:rose: grf