#pragma code("comdlg32.dll");
BOOL GetOpenFileName(LPOPENFILENAME lpofn);
#pragma code();
最佳答案
OPENFILENAME类型需要事先声明。
typedef struct tagOFN {
DWORD lStructSize;
HWND hwndOwner;
HINSTANCE hInstance;
LPCTSTR lpstrFilter;
LPTSTR lpstrCustomFilter;
DWORD nMaxCustFilter;
DWORD nFilterIndex;
LPTSTR lpstrFile;
DWORD nMaxFile;
LPTSTR lpstrFileTitle;
DWORD nMaxFileTitle;
LPCTSTR lpstrInitialDir;
LPCTSTR lpstrTitle;
DWORD Flags;
WORD nFileOffset;
WORD nFileExtension;
LPCTSTR lpstrDefExt;
DWORD lCustData;
DWORD lpfnHook; //LPOFNHOOKPROC lpfnHook;
LPCTSTR lpTemplateName;
} OPENFILENAME, * LPOPENFILENAME;
#pragma code ("comdlg32.dll")
BOOL GetOpenFileNameA(LPOPENFILENAME lpofn);
#pragma code()
提问者对于答案的评价:
谢谢,谢谢,真没想到那种类型还要自己定义一下。 关键是有的不需要再定义。 有的需要,所以搞不清楚哪些需要定义了。
原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc276194.html