Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Open/Save Dialouge box function problems

Open/Save Dialouge box function problems

Open/Save Dialouge box function problems

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?

RE: Open/Save Dialouge box function problems

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.

RE: Open/Save Dialouge box function problems

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.

RE: Open/Save Dialouge box function problems

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!

  Programmers helping programmers
  you can't find a better site.

RE: Open/Save Dialouge box function problems

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

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

RE: Open/Save Dialouge box function problems

Oh nuts...

Just noted the date this thread started on!

Take Care

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close