VC++学习

 一些函数:

GetDlgItem(int nID):获取对话框上控件的句柄。

ShowWindow(int nCmdShow ):设置控件的显示、隐藏。

GetDlgItemText( int nID, CString& rString ):获取控件上的文本并存储在字符串对象中。

CFileDialog( BOOL bOpenFileDialog, LPCTSTR lpszDefExt = NULL, LPCTSTR lpszFileName = NULL, DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, LPCTSTR lpszFilter = NULL, CWnd* pParentWnd = NULL );创建打开、另存为对话框。

成员函数:

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 filename of the selected file.
GetFileExt Returns the file extension of the selected file.
GetFileTitle Returns the title of the selected file.
GetNextPathName Returns the full path of the next selected file.
GetReadOnlyPref Returns the read-only status of the selected file.
GetStartPosition Returns the position of the first element of the filename list.

如:CFileDialog dlg(TRUE,"avi","*.avi",OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
  "avi文件(*.avi)|*.avi|*.mp3|*.rmvb|| ");

你可能感兴趣的:(VC++学习)