对话框问题
在vc++.net中,将 m_FileDlg.m_pOFN->lStructSize=88; 显示还是win98的打开文件对话框,
而不是win2000打开对话框. 源码如下:
CFileDialog m_FileDlg(true);
m_FileDlg.m_pOFN->lStructSize=88;
if(m_FileDlg.DoModal()==IDOK){
CString strDir;
strDir=m_FileDlg.GetFileName();
}
m_FileDlg.m_pOFN->lStructSize原值为76
问题点数:100、回复次数:5Top
1 楼mfc42d()回复于 2002-06-17 19:01:02 得分 100
OPENFILENAME ofn;
ZeroMemory(&ofn,sizeof(OPENFILENAME));
ofn.lStructSize =sizeof(OPENFILENAME);
ofn.lpstrFilter="*.*";
ofn.nMaxFile=700;
ofn.hwndOwner =m_hWnd;
GetOpenFileName(&ofn);Top
2 楼masterz(www.fruitfruit.com)回复于 2002-06-17 19:19:02 得分 0
In order to access Win2000 specific APIs etc, one needs the following #define in the application's stdafx.h (before any other #includes)
#define _WIN32_WINNT 0x0500Top
3 楼Lemon_2000(柠檬)回复于 2002-06-18 02:01:10 得分 0
up
Top
4 楼nix3m(数字地球)回复于 2002-06-18 08:37:58 得分 0
Agree with masterz()Top




