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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open/Save Dialouge box function problems

Status
Not open for further replies.

GameDude

Programmer
Jun 22, 2004
23
US
I have had a number of problems recently with certain functions and GUIDs not being defined properly/not being read properly by the compiler. My guess is that eithor a windows library is corrupt, or I need to change a setting in my compiler...

Anyway, the problem is that when I tried using the GetOpenFileName(OPENFILENAME) function, the compiler comes back saying something like "Undefined Symbol __stdcall(4) GetOpenFileName(OPENFILENAME) ... ". I am interpreting this as being the compiler's way of saying it doesn't recognize the function. MSDN says to include windows.h to use it, and so I have, but it still doesn't seem to recognize it.

The compiler I am using is Metrowerks Codewarrior.

Any ideas?
 
How did that '4' get in there in __stdcall(4)? I don't think it belongs in there, but I could be wrong. Maybe when you were browsing one of the header files, you may have accidentally hit some key that put in a random character like that, and then later when you closed your editor, maybe you replied "yes" to "save all files?" or something like that.
 
Most of the function definition problems I have have a number associated with the stdcall. Before this, the most common number was 16...

I never so much as browsed to the location of the header file, much less opened it. I didn't want to mess with any pre-written code until I was sure I knew what I was doing. My guess is that the compiler settings aren't set right. I didn't see any settings that would help with it, but I am also not that accustom with changing them.

Most of the functions I have been using out of the windows.h file have worked fine for me, the majority of them being drawing functions. For some reason, however, it has problems with select routines that don't seem to have anything to do with one another (no particular ones come to mind).

Thank you for the response, and let me know if you can think of any other possibilities.
 
Try this link, Ken Getz has a good code snippet.

Call the standard Windows File Open/Save dialog box

BrowseFolder Dialog

This should solve all your problems...
Make sure you delete the code or module that has your previous code, to ensure that you call the right one!

AccessGuruCarl
Programmers helping programmers
you can't find a better site.
 
Have you included the library?

You need to ensure that the linker is set to "include" Comdlg32.lib as one of its libraries

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Oh nuts...


Just noted the date this thread started on!

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top