如何寫一個功能為新增表單並產生統計圖的函數 |
尚未結案
|
phorn
一般會員 發表:28 回覆:60 積分:17 註冊:2004-03-03 發送簡訊給我 |
我在本站找尋了動態新增表單的方法,那我把它寫在函數裡結果發生了一些問題
,分別是Show出來的表單卻沒關閉與放大的按鈕,而我一並放在表單裡的元件卻顯示不出來,不知道是什麼原因,請有經驗的大大指導我一下好嗎??謝謝!! 這是我的函數程式碼: void __fastcall TImageTool::Histogram(Graphics::TBitmap *ImageBitmap)
{
if(ImageBitmap->Empty==true)return;
//影像暫存器若空的則跳出函數
Graphics::TBitmap *TempBitmap=new Graphics::TBitmap;
TempBitmap->Assign(ImageBitmap);TempBitmap->PixelFormat=pf24bit;
int N=TempBitmap->Width*TempBitmap->Height;
unsigned int Ni[256];
for(int i=0;i<256;i )Ni[i]=0;
for(int y=0;y
|
李國維
高階會員 發表:42 回覆:287 積分:235 註冊:2003-02-07 發送簡訊給我 |
|
phorn
一般會員 發表:28 回覆:60 積分:17 註冊:2004-03-03 發送簡訊給我 |
|
李國維
高階會員 發表:42 回覆:287 積分:235 註冊:2003-02-07 發送簡訊給我 |
function不一定要再寫一各cpp.舉例來說.
寫一各最小值的function.
//unit1.h class TForm1 : public TForm { __published: // IDE-managed Components void __fastcall FormCreate(TObject *Sender); private: // User declarations int __fastcall GetMinValue(int a,int b); public: // User declarations __fastcall TForm1(TComponent* Owner); }; //unit1.cpp int __fastcall TForm1::GetMinValue(int a,int b) { //Write code } void __fastcall TForm1::Button1Click(TObject *Sender) { int i = GetMinValue(10,5);//使用此function }int 表示傳回int,如無傳回直可用void |
phorn
一般會員 發表:28 回覆:60 積分:17 註冊:2004-03-03 發送簡訊給我 |
引言: function不一定要再寫一各cpp.舉例來說. 寫一各最小值的function.謝謝國為大大你說的方法我已經知道了 我是因為函數太多所以才分兩個.//unit1.h class TForm1 : public TForm { __published: // IDE-managed Components void __fastcall FormCreate(TObject *Sender); private: // User declarations int __fastcall GetMinValue(int a,int b); public: // User declarations __fastcall TForm1(TComponent* Owner); }; //unit1.cpp int __fastcall TForm1::GetMinValue(int a,int b) { //Write code } void __fastcall TForm1::Button1Click(TObject *Sender) { int i = GetMinValue(10,5);//使用此function }int 表示傳回int,如無傳回直可用void |
phorn
一般會員 發表:28 回覆:60 積分:17 註冊:2004-03-03 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |