全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:705
推到 Plurk!
推到 Facebook!

RE:delete editbox in struct

尚未結案
chgtauhan
一般會員


發表:10
回覆:21
積分:6
註冊:2005-07-23

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-09-18 18:41:29 IP:203.106.xxx.xxx 未訂閱
hi,can anyone help me to solve this problem. i have constructed a struct which contains a editbox,  later i wish to delete the struct, but i notice that the edit box still occur on the form. So,can i know how to delete the edit box via command delete here is the command i write:
typedef struct
{
int Wt;
TEdit *InputBox
}LINK;
LINK**e;
...
...
e[i][j].InputBox=new TEdit(this);
...
...
for(i=1;i<=N;i  )
   delete e[i];
delete e;
after i run those code, the edit box still occur on the screen.... can anyone help me to solve this problem... thanks
bass15
高階會員


發表:24
回覆:171
積分:119
註冊:2003-10-27

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-09-19 02:02:02 IP:61.59.xxx.xxx 未訂閱
hi, try this...  
for(i=1;i<=N;i  ) {
   delete e[i].InputBox;
   delete e[i];
}
delete e;     
chgtauhan
一般會員


發表:10
回覆:21
積分:6
註冊:2005-07-23

發送簡訊給我
#3 引用回覆 回覆 發表時間:2005-09-21 20:53:37 IP:203.106.xxx.xxx 未訂閱
hi, i have tried your code,but the compiler say that Address vio,lation error. So is there other way to solve the problem???
系統時間:2024-04-27 23:12:11
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!