線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:2039
推到 Plurk!
推到 Facebook!

BCB連結WORD錯誤訊息....

缺席
drew
一般會員


發表:5
回覆:7
積分:2
註冊:2003-08-15

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-08-26 20:57:28 IP:163.28.xxx.xxx 未訂閱
BCB 6 + windows 2000 spk4     請問我的bcb在 compiler 時會出error  
[C   Error] ComCtrls.hpp(2638): E2015 Ambiguity between 'Windows' and 'Word_2k::Windows' 
 
請問我該如何處理? 我是照抄別人的程式,他的程式可以用,我照打就不能用?
RaynorPao
版主


發表:139
回覆:3622
積分:7025
註冊:2002-08-12

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-08-26 22:05:41 IP:61.221.xxx.xxx 未訂閱
引言: BCB 6 windows 2000 spk4 請問我的bcb在 compiler 時會出error
[C   Error] ComCtrls.hpp(2638): E2015 Ambiguity between 'Windows' and 'Word_2k::Windows' 
 
請問我該如何處理? 我是照抄別人的程式,他的程式可以用,我照打就不能用?
drew 你好: 請問?? 你的程式碼呢?? 方便貼上來幫你看看嗎?? --
------
-- 若您已經得到滿意的答覆,請適時結案!! --
-- 欲知前世因,今生受者是;欲知來世果,今生做者是 --
-- 一切有為法,如夢幻泡影,如露亦如電,應作如是觀 --
drew
一般會員


發表:5
回覆:7
積分:2
註冊:2003-08-15

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-08-27 00:19:37 IP:163.28.xxx.xxx 未訂閱
引言: drew 你好: 請問?? 你的程式碼呢?? 方便貼上來幫你看看嗎??
你好: 由於我的程式很長 我不知該貼哪一個部分?? 我是由一個 class="code"> [C Error] ComCtrls.hpp(2638): E2015 Ambiguity between 'Windows' and 'Word_2k::Windows' 這樣情況下,應該port哪一個部分呢? 我是抄別人的程式,可是出現error,不懂他的程式能run, 而我的不能????
axsoft
版主


發表:681
回覆:1056
積分:969
註冊:2002-03-13

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-08-27 10:51:54 IP:61.218.xxx.xxx 未訂閱
drew您好:    1.如果您是用BCB附的Offtce Server元件請您檢查一下您的Source Code中是否
  有下面的紅色部分
2.如果您是用OLE來控制MS-Word請加上下面兩行
  #include  
  #include  // 註如為C   Builder 5需加上這一行,如為
                      //  C   Builder 6則省略這一行        Unit1.cpp
//---------------------------------------------------------------------------    #include 
#pragma hdrstop    #include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "Word_2K_SRVR"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------    Unit11.h
//---------------------------------------------------------------------------    #ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include 
#include 
#include 
#include <Forms.hpp>
#include "Word_2K_SRVR.h"
#include 
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:        // IDE-managed Components
        TWordApplication *WordApplication1;
private:        // User declarations
public:                // User declarations
        __fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
/*開心的事情別隱藏在心裡,分享給別人知道會更快樂的*/
/*得到新知識別隱藏在心裡,分享給別人了解會更清楚的*/
drew
一般會員


發表:5
回覆:7
積分:2
註冊:2003-08-15

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-08-27 14:12:58 IP:163.28.xxx.xxx 未訂閱
感謝你的回應:        我查看了,你說的部分我都有寫到,     我隨手附上Unit4.h 及 Unit4.cpp 的相關設定    
     #include 
#pragma hdrstop    #include "Unit4.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "Word_2K_SRVR"
#pragma resource "*.dfm"
TForm4 *Form4;
//--------------------------------------------------------------------
__fastcall TForm4::TForm4(TComponent* Owner)
        : TForm(Owner)
{    }
//-------------------------------------------------------------------    //--------------------------------------------------------------------    #ifndef Unit4H
#define Unit4H
//--------------------------------------------------------------------
#include 
#include 
#include 
#include <Forms.hpp>
#include "Word_2K_SRVR.h"
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include "Unit2.h"
#include <math.h>
#include 
#include     //--------------------------------------------------------------------
class TForm4 : public TForm
{
__published:        // IDE-managed Components
        TDBGrid *DBGrid1;
        TGroupBox *GroupBox1;
        TGroupBox *GroupBox2;
        TListBox *ListBox1;
        TListBox *ListBox2;
        TRadioGroup *RadioGroup1;
        TRadioGroup *RadioGroup2;
        TLabeledEdit *LabeledEdit1;
        TButton *Button1;
        TButton *Button2;
        TButton *Button3;
        TMemo *Memo1;
        TDBChart *DBChart1;
        TDataSource *DataSource1;
        TQuery *Query1;
        TQuery *Query2;
        TWordApplication *WordApplication1;
        TWordFont *WordFont1;
        TWordDocument *WordDocument1;
        TLineSeries *Series1;
        TLineSeries *Series2;
        TLineSeries *Series3;
        TLineSeries *Series4;
        void __fastcall RadioGroup1Click(TObject *Sender);
        void __fastcall Button1Click(TObject *Sender);
        void __fastcall Button2Click(TObject *Sender);
        void __fastcall Button3Click(TObject *Sender);
private:        // User declarations
public:                // User declarations
        __fastcall TForm4(TComponent* Owner);            double GraphScale1();   
        double GraphScale2();   
        void PlotWorkLoadLoss();   
        void PlotNonWorkLoadLoss();  
        void PlotWorkLosskind();   
        void PlotNonWorkLosskind();    
        void FontSet1();  
        void FontSet2();  
        void GetFDInf();
        void GetFig1();
        void GetFig2();
        void GetFig3();
        void GetFig4();
        void Conclution();
        
        __fastcall ~TForm4();
};
//--------------------------------------------------------------------
extern PACKAGE TForm4 *Form4;
//--------------------------------------------------------------------
#endif
   
然後再度compiler後仍然出現下列問題 , 在 ComCtrls.hpp 中
 
typedef void __fastcall (__closure *TLVDrawItemEvent)(TCustomListView* Sender, TListItem* Item, const Types::TRect &Rect, Windows::TOwnerDrawState State);
 
請教一下該如何解決??
系統時間:2024-05-06 10:52:48
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!