win32 file opener

Started by
3 comments, last by PunaProgrammer chris 18 years, 11 months ago
Can someone show me how to open a file with the win32 GUI? I am using c++, and I already have a function to actually open the file, read it's contents, etc and it takes a string (the filename for the file being opened) as a parameter. The funtion looks like this: mappy.Load("insertfilenamehere.wak"); I would prefer if it only opened .wak files, but if it opens any kind of file, that works too. My freind tried doing this, however it wouldn't work on any computers running winXP without SP2, so I hope he was just doing something wrong. Any help would be greatly appreciated.
Advertisement
Are you using fstream?

ace
Try GetOpenFileName for a file open dialog box (I think that's what you're asking for). There's an example on usage here. Scroll down a bit.

Yeah, I am asking for a file open dialog box, and the GetOPpenFileName looks like what I want, but how exactly would I use it? Just copy the example? If so, where would I put the mappy.Load function? Some clarification would really help.
Alright, I've decided to give up on using win32, it doesn't seem to fully work on my computer (or one of my freinds computer) but it seems to work on other computers so... I don't know what to do.

Does anyone know of a way to have a open file dialog box not using win32? I think this might solve my problems (plus it would make it cross platform). I am on the brink of going insane over this open file thing, so any help would really, really be appreciated.

This topic is closed to new replies.

Advertisement