CFileDialog dlg
CFileDialogdlg(TRUE,NULL,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,"AllFiles(*.*)|*.*...
CFileDialog dlg(TRUE,NULL,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,"All Files(*.*)|*.*||",AfxGetMainWnd());
如果dlg是CFileDialog的对象,
对象后面加括号带参数,好像是函数,这种用法怎么解释? 展开
如果dlg是CFileDialog的对象,
对象后面加括号带参数,好像是函数,这种用法怎么解释? 展开
展开全部
CFileDialog 类中有带参数构造函数
CFileDialog( BOOL bOpenFileDialog, LPCTSTR lpszDefExt = NULL, LPCTSTR lpszFileName = NULL, DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, LPCTSTR lpszFilter = NULL, CWnd* pParentWnd = NULL );
而你定义的就是调用了这个函数
CFileDialog( BOOL bOpenFileDialog, LPCTSTR lpszDefExt = NULL, LPCTSTR lpszFileName = NULL, DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, LPCTSTR lpszFilter = NULL, CWnd* pParentWnd = NULL );
而你定义的就是调用了这个函数
展开全部
构造函数。
大体思想就是利用提供的参数生成一个临时对象,然后赋予一个对象。注意,这个对象是临时的,也就是说出了局部作用域,这个对象就被析构了
大体思想就是利用提供的参数生成一个临时对象,然后赋予一个对象。注意,这个对象是临时的,也就是说出了局部作用域,这个对象就被析构了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
构造函数。
CFileDialog::CFileDialog
This constructor creates an instance of a standard Windows CE file dialog box-object. Either a Open or Save As dialog box is constructed, depending on the value of bOpenFileDialog.
The following code example demonstrates how to use CFileDialog to rename or move an existing file dialog box. My Documents and docs are directories and new file is the new name of the file dialog box.
CFileDialog dlg(FALSE, NULL, TEXT("\\My Documents\\docs\\new file"),
OFN_PROPERTY);
The following code example demonstrates how to use CFileDialog to create a new file dialog box.
CFileDialog dlg(TRUE, NULL, NULL, OFN_PROJECT);
CFileDialog(
BOOL bOpenFileDialog,
LPCTSTR lpszDefExt = NULL,
LPCTSTR lpszFileName = NULL,
DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
LPCTSTR lpszFilter = NULL,
CWnd* pParentWnd = NULL);
详见msdn
CFileDialog::CFileDialog
This constructor creates an instance of a standard Windows CE file dialog box-object. Either a Open or Save As dialog box is constructed, depending on the value of bOpenFileDialog.
The following code example demonstrates how to use CFileDialog to rename or move an existing file dialog box. My Documents and docs are directories and new file is the new name of the file dialog box.
CFileDialog dlg(FALSE, NULL, TEXT("\\My Documents\\docs\\new file"),
OFN_PROPERTY);
The following code example demonstrates how to use CFileDialog to create a new file dialog box.
CFileDialog dlg(TRUE, NULL, NULL, OFN_PROJECT);
CFileDialog(
BOOL bOpenFileDialog,
LPCTSTR lpszDefExt = NULL,
LPCTSTR lpszFileName = NULL,
DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
LPCTSTR lpszFilter = NULL,
CWnd* pParentWnd = NULL);
详见msdn
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
带参数的构造函数
这个应该明白了八
这个应该明白了八
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询