Hi
I Translate a c/c++ source to masm32 and i need in OPENFILENAME struct " dwReserved"
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;
LPARAM lCustData;
LPOFNHOOKPROC lpfnHook;
LPCTSTR lpTemplateName;
#if (_WIN32_WINNT >= 0x0500)
void *pvReserved;
DWORD dwReserved;
DWORD FlagsEx;
#endif
} OPENFILENAME, *LPOPENFILENAME;
What make this dwReserved and why is this not included in the windows.inc project?
Regards,
The structure in windows.inc apparently predates Windows 2000. You could simply add the new members to your copy of the structure:
pvReserved DWORD ?
dwReserved DWORD ?
FlagsEx DWORD ?
Yes i have already added
only why if this not include in the original windows.inc
is this an older version?
Yes it is an older version. Windows can deal with both, knowing the size of the struct. The only difference is FlagsEx, which shows or hides the places bar.
MSDN (http://msdn.microsoft.com/en-us/library/ms646839%28VS.85%29.aspx):
QuoteFor compatibility reasons, the Places Bar is hidden if Flags is set to OFN_ENABLEHOOK and lStructSize is OPENFILENAME_SIZE_VERSION_400
The logic here is that if you set the hook, you probably had own ideas on what to show there.
Ok thanks for this information