Tuesday, March 15, 2005

OFN_CREATEPROMPT

I think my brains getting a bit addled of late. I've been playing with GetSaveFileName and GetOpenFileName from the Windows API. You need to pass an OPENFILENAME struct to get this running. Now one of the flag values - OFN_CREATEPROMPT is supposed to prompt the user to create a file if the file does not already exist. Somehow no matter how hard I tried, GetSaveFileName simply would'nt prompt me for file creation. After about two days of slogging on this I tried the same flag with GetOpenFileName. And...it worked.

It just did'nt strike me that it's just not very useful to prompt a user to create a new file while saving. Guess, I need to cut down on the weekend whisky.

No comments:

About Me

My photo
C/C++ Programmer doing CAD on Windows. Some web development experience. Bangalorean.

Blog Archive

Labels