News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Missing OPENFILENAME

Started by ragdog, June 13, 2010, 08:55:48 AM

Previous topic - Next topic

ragdog

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,

MichaelW

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 ?

eschew obfuscation

ragdog

Yes i have already added

only why if this not include in the original windows.inc

is this an older version?

jj2007

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:
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.

ragdog

Ok thanks for this information