在BCB中的MDI環境有問題!! |
尚未結案
|
jlvjlv
一般會員 發表:10 回覆:7 積分:3 註冊:2004-12-25 發送簡訊給我 |
各位厲害的大大~~ 我現在才開始學使用BCB~~我現在在MDI應用程式中做出了個簡單的可開多張影像的程式~~不知道是BCB中原本就有限制還是怎樣~~我一直無法允許[Save].[Close]這些指令執行~~
void __fastcall TMainForm::UpdateActions()
{
FileCloseItem->Enabled = MDIChildCount > 0;
FileSaveItem-> Enabled = MDIChildCount > 0;
}
書上教我打上這程式~~ 但無法執行~~[C++ Error] main.cpp(83): E2316 '_fastcall TMainForm::UpdateActions()' is not a member of 'TMainForm'
這是他的問題~~ 我一直不知道問題出在哪~~麻煩各位厲害的大大~~幫幫我吧!!
*********************************************************
以下我附上全部ㄉ程式
//-------------------------------------------------------------------------- #include |
RedSnow
版主 發表:79 回覆:1322 積分:845 註冊:2003-12-15 發送簡訊給我 |
jlvjlv 您好: 我不太清楚您的使用 BCB 版本,因此我以自身的環境 (BCB4) 來做相關說明如下: 雖然 TcustomForm 包裝有一個名為 UpdateActions 的函數,但是您應該是不可能直接使用該函數的,因此僅能推論您這個 UpdateActions 函數是屬於 "自定函數",而且可能是供 ActionList 的 OnUpdate 事件使用的,如果是這樣子的話,您應該查看一下相對於您這個 .cpp 檔的 .h 檔案 (應該是 Main.h 吧~) 內是否有 UpdateActions 函數的宣告?如果沒有宣告的話,就將它補上去,否則編譯器是不認識它的。 Main.h 檔案:
void __fastcall UpdateActions();
|
jlvjlv
一般會員 發表:10 回覆:7 積分:3 註冊:2004-12-25 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |