fork download
  1. void CWTFFDlg::OnBnClickedButton1()
  2.  
  3. {
  4.  
  5. // szFilters is a text string that includes two file name filters:
  6.  
  7. // "*.my" for "MyType Files" and "*.*' for "All Files."
  8.  
  9. TCHAR szFilters[]= _T("MyType Files (*.jpg)|*.jpg|All Files (*.*)|*.*||");
  10.  
  11.  
  12.  
  13.  
  14.  
  15. CFileDialog fileDlg(TRUE, _T("jpg"), _T("*.jpg"),
  16.  
  17. OFN_FILEMUSTEXIST | OFN_HIDEREADONLY, szFilters);
  18.  
  19.  
  20.  
  21. // Display the file dialog. When user clicks OK, fileDlg.DoModal()
  22.  
  23. // returns IDOK.
  24.  
  25. if(fileDlg.DoModal() == IDOK)
  26.  
  27. {
  28.  
  29. CString pathName = fileDlg.GetPathName();
  30.  
  31. CString fileName = fileDlg.GetFileTitle();
  32.  
  33.  
  34.  
  35. SetWindow
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
void CWTFFDlg::OnBnClickedButton1()
^
Main.java:1: error: class, interface, or enum expected
void CWTFFDlg::OnBnClickedButton1()
     ^
Main.java:15: error: class, interface, or enum expected
   CFileDialog fileDlg(TRUE, _T("jpg"), _T("*.jpg"),
   ^
Main.java:25: error: class, interface, or enum expected
   if(fileDlg.DoModal() == IDOK)
   ^
Main.java:31: error: class, interface, or enum expected
    CString fileName = fileDlg.GetFileTitle();
    ^
Main.java:35: error: reached end of file while parsing
   SetWindow
   ^
6 errors
stdout
Standard output is empty