Click here to Skip to main content
15,916,600 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Getting Visual Studio .NET 2003 Add-Ins to work Pin
darkbyte28-Aug-04 4:07
darkbyte28-Aug-04 4:07 
GeneralMacro or another Way Pin
Grahamfff27-Aug-04 10:27
Grahamfff27-Aug-04 10:27 
GeneralRe: Macro or another Way Pin
David Crow27-Aug-04 10:40
David Crow27-Aug-04 10:40 
GeneralRe: Macro or another Way Pin
Grahamfff27-Aug-04 21:52
Grahamfff27-Aug-04 21:52 
GeneralRe: Macro or another Way Pin
David Crow28-Aug-04 17:24
David Crow28-Aug-04 17:24 
GeneralRe: Macro or another Way Pin
Grahamfff30-Aug-04 9:24
Grahamfff30-Aug-04 9:24 
GeneralRe: Macro or another Way Pin
Bob Stanneveld28-Aug-04 7:40
Bob Stanneveld28-Aug-04 7:40 
GeneralsaveFileDialog Pin
jet91527-Aug-04 10:04
jet91527-Aug-04 10:04 
I'm have a MFC project which includes a button. When pressed, i want the SaveFileDialog box to come up. I've been using the examples i've seen around online to get started but I still get errors. Here is the code I've been using:

void CProductVersionsDlg::OnButton2()
{
SaveFileDialog sdf = new SaveFileDialog();
sdf.AddExtension = true;
sdf.CheckPathExists = true;
sdf.InitialDirectory = @"C:\";
sdf.DefaultExt = "*.txt";
sdf.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
sdf.ShowDialog(this);
MessageBox.Show(sdf.FileName);
}

"Error:error C2065: 'SaveFileDialog' : undeclared identifier"
there are many more errors but this is the first one

I think I am missing a .h file to include.
What is the name of the file i need to include? I've been looking around online but i can't find any include files, or is it something else?

I'm running Microsoft Visual C++ 6.0 on a windows 2000 system.
GeneralRe: saveFileDialog Pin
Maximilien27-Aug-04 10:14
Maximilien27-Aug-04 10:14 
GeneralRe: saveFileDialog Pin
toxcct28-Aug-04 7:58
toxcct28-Aug-04 7:58 
GeneralRegistry Corruption Pin
aman200627-Aug-04 9:10
aman200627-Aug-04 9:10 
GeneralRe: Registry Corruption Pin
David Crow27-Aug-04 9:25
David Crow27-Aug-04 9:25 
GeneralRe: Registry Corruption Pin
aman200627-Aug-04 10:42
aman200627-Aug-04 10:42 
GeneralRe: Registry Corruption Pin
David Crow27-Aug-04 11:00
David Crow27-Aug-04 11:00 
GeneralRe: Registry Corruption Pin
Michael Dunn27-Aug-04 21:01
sitebuilderMichael Dunn27-Aug-04 21:01 
QuestionNeed to insert text? Pin
Larsson27-Aug-04 9:04
Larsson27-Aug-04 9:04 
AnswerRe: Need to insert text? Pin
David Crow27-Aug-04 9:33
David Crow27-Aug-04 9:33 
GeneralRe: Need to insert text? Pin
Larsson27-Aug-04 10:03
Larsson27-Aug-04 10:03 
GeneralRe: Need to insert text? Pin
David Crow27-Aug-04 10:38
David Crow27-Aug-04 10:38 
QuestionInsert text to file? Pin
Larsson27-Aug-04 8:44
Larsson27-Aug-04 8:44 
AnswerRe: Insert text to file? Pin
darkbyte27-Aug-04 13:58
darkbyte27-Aug-04 13:58 
GeneralDoc/View and permanent/temporary handle maps Pin
herbert_chow27-Aug-04 8:24
herbert_chow27-Aug-04 8:24 
GeneralRe: Doc/View and permanent/temporary handle maps Pin
Neville Franks27-Aug-04 11:34
Neville Franks27-Aug-04 11:34 
Generalextern "C" in VisualStudio Pin
Marcello27-Aug-04 5:58
Marcello27-Aug-04 5:58 
GeneralRe: extern "C" in VisualStudio Pin
darkbyte27-Aug-04 13:38
darkbyte27-Aug-04 13:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.