Simple Problem. How can I show an "Open file" dialog in a dialog-based App from MFC AppWizard
-
I am a Visual C++ newbie (I worked with Borland Delphi a long time so I know something... although not what I need now). I have to write a file encoder. In VC++ 6 Everything is set, I began a new project with MFC AppWizard, I selected dialog-based and now I have a dilemma: How do I show up an "Open file" dialog type window??! and a save one too... I would like if possible to be able to change the file filter and/or caption (I am developping it in another language) Like in Notepad when you hit CTRL-O or File->Open. I don't necesarily need it Win2000/XP style but I HOPE THERE IS A FUNCTION IN THE WIN SDK. In delphi it was so simple.Just drop a OpenFileDialog control on the main form and say: "Dialog1.Execute();" Visual C++ is certainly no RAD for me... Thanks in advance! ;-)
-
I am a Visual C++ newbie (I worked with Borland Delphi a long time so I know something... although not what I need now). I have to write a file encoder. In VC++ 6 Everything is set, I began a new project with MFC AppWizard, I selected dialog-based and now I have a dilemma: How do I show up an "Open file" dialog type window??! and a save one too... I would like if possible to be able to change the file filter and/or caption (I am developping it in another language) Like in Notepad when you hit CTRL-O or File->Open. I don't necesarily need it Win2000/XP style but I HOPE THERE IS A FUNCTION IN THE WIN SDK. In delphi it was so simple.Just drop a OpenFileDialog control on the main form and say: "Dialog1.Execute();" Visual C++ is certainly no RAD for me... Thanks in advance! ;-)
-
Sure there is a function in the windows sdk, it's called
GetOpenFileName
Just fill in the OPENFILENAME struct an call the function. regards