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

會有Source,target的問題

尚未結案
speaking123456
一般會員


發表:5
回覆:2
積分:1
註冊:2006-12-05

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-04-18 00:03:09 IP:59.125.xxx.xxx 訂閱
<textarea class="cpp" rows="10" cols="60" name="code"> #include #pragma hdrstop #include "Unit1.h" #include #include //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::Timer1Timer(TObject *Sender) { long i, j; FILE *fp; unsigned char *image_buf; char fname_bmp[24882]; unsigned char header[54]; unsigned char *image; int xsize; int ysize; char *filename; image_buf=(unsigned char *)malloc((size_t)xsize*ysize*3); if (image_buf==NULL) sprintf(fname_bmp, "123.bmp", filename); if ((fp=fopen(fname_bmp, "rb"))==NULL) fread(header, sizeof(unsigned char),54,fp); fread(image_buf, sizeof(unsigned char), (size_t)(long)xsize*ysize*3, fp); for(i=0; iPicture->Bitmap->ScanLine[(Source->Height-1)-w]; Y=static_cast(Line[3*v] Line[3*v 1] Line[3*v 2])/3; testIMG[w][v] = Y; } } for(w=0;wHeight;w ) { for(v=0;vWidth;v ) { Line=(BYTE*)Target->Picture->Bitmap->ScanLine[(Source->Height-1)-w]; Line[3*v]=(BYTE)testIMG[w][v]; Line[3*v 1]=(BYTE)testIMG[w][v]; Line[3*v 2]=(BYTE)testIMG[w][v]; } } Target->Canvas->Draw(0,0,Target->Picture->Bitmap); } </textarea> [C Error] Unit1.cpp(61): E2451 Undefined symbol 'Source' [C Error] Unit1.cpp(62): E2274 < expected [C Error] Unit1.cpp(70): E2451 Undefined symbol 'Target' 請問大家這要怎麼改阿,謝謝
Stallion
版主


發表:52
回覆:1600
積分:1995
註冊:2004-09-15

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-04-18 00:16:28 IP:211.22.xxx.xxx 未訂閱
沒用過BCB嗎?
程式裡面的Source及Target指的是Form上面所引用的VCL元件名稱(Name屬性)。
系統時間:2024-05-03 4:46:41
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!