Board index » cppbuilder » ambiguity error between ComCtrls.hpp and Execl_97::Windows

ambiguity error between ComCtrls.hpp and Execl_97::Windows


2003-10-15 11:39:03 PM
cppbuilder74
Hello all,
I am wirtting a BCB 6 application that retrieves MS Excel. I added to a form
a TProgressBar and the ExcelAplication and get an error (s.a.)?
Any hint would be nice.
Thanks in advance!
Steffen
 
 

Re:ambiguity error between ComCtrls.hpp and Execl_97::Windows

Weird little thing!
Try changing the include order...
You have to include ComCtrls.hpp before the Excel Unit (here it is Excel_2K_SRVR.h)
Example:
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "Excel_2K_SRVR.h"
#include <ComCtrls.hpp>
#include <OleServer.hpp>
You'll have to change it to
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include "Excel_2K_SRVR.h"
#include <OleServer.hpp>
It's veeery strange, but worked here.
Andr?
 

Re:ambiguity error between ComCtrls.hpp and Execl_97::Windows

Thanks a lot!
Works perfect!
"Andr?Taffarello" <backwards:rb.racsfu.pmoc@taerdna>schrieb im Newsbeitrag
Quote

Weird little thing!

Try changing the include order...
You have to include ComCtrls.hpp before the Excel Unit (here it is
Excel_2K_SRVR.h)

Example:

#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "Excel_2K_SRVR.h"
#include <ComCtrls.hpp>
#include <OleServer.hpp>

You'll have to change it to

#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include "Excel_2K_SRVR.h"
#include <OleServer.hpp>


It's veeery strange, but worked here.

Andr?
 

{smallsort}