Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable doesn't exist?

Status
Not open for further replies.

timmay3141

Programmer
Joined
Dec 3, 2002
Messages
468
Location
US
I'm trying to use an OPENFILENAME struct with the GetOpenFileName and GetSaveFileName functions. There's a side navigation bar on the dialog that I find annoying, but MSDN says how to fix this using the member variable FlagsEx:

FlagsEx
Windows 2000/XP: A set of bit flags you can use to initialize the dialog box. Currently, this member can be zero or the following flag.
OFN_EX_NOPLACESBAR
If this flag is set, the places bar is not displayed. If this flag is not set, Explorer-style dialog boxes include a places bar containing icons for commonly-used folders, such as Favorites and Desktop.


For some reason, OPENFILENAME does not contain a member named FlagsEx. The OFN_EX_NOPLACESBAR flag doesn't exist, either. I downloaded the newest service pack, and it still doesn't exist. I use Windows XP Pro, so it should be there (obviously the places bar is). What should I do here?
 
Make sure you have downloaded and installed the latest Platform SDK. This changes header files and libraries etc.

Also here is the header file definition of FlagsEx
Code:
#if (_WIN32_WINNT >= 0x0500)
   void *		pvReserved;
   DWORD        dwReserved;
   DWORD        FlagsEx;
#endif // (_WIN32_WINNT >= 0x0500)
} OPENFILENAMEW, *LPOPENFILENAMEW;

-pete
 
What a huge download.

I'll get this later. Thanks for the tip.
 
Now that the forum is back up (it was down for everyone and not just me, right?), I'm having problems with this. I got the Platform SDK, and ran the program that is supposed to register it with the compiler. Anyway, now if I right click on #include <commdlg.h> and select open file, the new members are there (it's going to the newly downloaded file). However, if I enter OPENFILENAME::, the box that pops up does NOT have the new members, and if I type out FlagsEx, I get the same error that it does not exist. I tried a rebuild all without success. Apparently, the project thinks it is using the correct file when it is not. Help?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top