0

In my project (Borland C++ Builder, Windows Xp ) am using following code for opening the file

  TOpenDialog *OpenDialog;

   OpenDialog->Filter = "all files (*.*)";
     OpenDialog->InitialDir="::{20D04FE0-3AEA-1069-A2D8-08002B30309D}";
     OpenDialog->Execute();

But the "My computer" tab is empty its not showing the drives. Rest "My Rescent Documnets" , "Desktop", "My Documents", "My network drives" all are showing the folders or drives in them.

I had created a new project in BCB with the same above code in that its working fine. When i am including this new project files in my old project again the error is reproducable.

I tried to use OpenFileDialog the code as follows :-

   OpenFileDialog *OpenFileDialog1 = new OpenFileDialog;

   OpenFileDialog1->Filter = "all files (*.*)";
     OpenFileDialog1->InitialDir="::{20D04FE0-3AEA-1069-A2D8-08002B30309D}";
     OpenFileDialog1->Execute();

this is giving compliation error : Undefined symbol 'OpenFileDialog'
Help me out to figure out the problem

2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by hii...
0

Is that a compilation error or a linker error?
if that's a linker error then you may have to add libraries or modify the command lines.
Make sure your compiling for win32GUI instad of win32 console.

0

For the following code

 OpenFileDialog *OpenFileDialog1 = new OpenFileDialog;

     OpenFileDialog1->Filter = "all files (*.*)";
     OpenFileDialog1->InitialDir="::{20D04FE0-3AEA-1069-A2D8-08002B30309D}";
     OpenFileDialog1->Execute();

the error which i am getting is
Warning W8074 .\TMainForm.cpp 1438: Structure passed by value in function _fastcall TMainForm::LoadRegistryMainWindowPosition()
Error E2451 .\TMainForm.cpp 2156: Undefined symbol 'OpenFileDialog' in function _fastcall TMainForm::ScnLoadMenuItemClick(TObject *)
Error E2451 .\TMainForm.cpp 2156: Undefined symbol 'OpenFileDialog1' in function _fastcall TMainForm::ScnLoadMenuItemClick(TObject *)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.