当前位置: 代码迷 >> WinCE >> WINCE4.2里面到底有没有CFileDialog类?解决方案
  详细解决方案

WINCE4.2里面到底有没有CFileDialog类?解决方案

热度:167   发布时间:2016-04-28 13:32:41.0
WINCE4.2里面到底有没有CFileDialog类?
有的话,如何用?

------解决方案--------------------
当然有.
CFileDialog *openPicDlg=new CFileDialog(true,NULL,NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,_T( "Bmp Files(*.bmp)|*.bmp|All Files(*.*)|*.*| "),NULL);

int nResponse = openPicDlg-> DoModal();
if (nResponse == IDOK)
{
strImageFilePath=openPicDlg-> GetPathName();
}

------解决方案--------------------
当然有 可能功能少点
------解决方案--------------------
wince的对话框类功能比较少,好像只能浏览MyDocument目录及其子目录。如果需要浏览其他目录,好像需要自己写一个。
------解决方案--------------------
Construction Methods

Method Description
CFileDialog Constructs a CFileDialog object.

Operations Methods

Method Description
DoModal Displays the dialog box and allows the user to make a selection.
GetPathName Returns the full path of the selected file.
GetFileName Returns the file name of the selected file.
GetFileExt Returns the file extension of the selected file.
GetFileTitle Returns the title of the selected file.

Overridable Methods

Method Description
OnShareViolation Called when a share violation occurs.
OnFileNameOK Called to validate the file name entered in the dialog box.
OnLBSelChangedNotify Called when the list box selection changes.

------解决方案--------------------
还是自己写个好了
wince自带的却是不敢恭维
  相关解决方案