[問題] 有關GetDlgItem問題

看板C_and_CPP (C/C++)作者 (Rex)時間15年前 (2011/02/09 14:09), 編輯推噓0(005)
留言5則, 2人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) VC++ 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) MFC 問題(Question): 我有兩個對話盒:甲、乙 主對話盒(甲)中還包含屬性分頁(Property Page) 其中A分頁有Text Control 當我按下主對話盒(甲)中的一個button 乙對話盒會出現!裡面有edit control 然後當修改儲存後 希望可以更改 主對話盒(甲)中的Text Control 餵入的資料(Input): 預期的正確結果(Expected Output): 錯誤結果(Wrong Output): 程式碼(Code):(請善用置底文網頁, 記得排版) cp.GetDlgItem(IDC_INFO_5)->SetWindowText("Device 0"); 這是出錯的程式碼行 會跳出一式窗說:An invalid argument was encountered 可否請問何解? 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.128.90.1

02/09 20:49, , 1F
SetDlgItemText(IDC_Info_5, "Device 0");
02/09 20:49, 1F

02/10 08:54, , 2F
可是是不一樣的 的對話盒
02/10 08:54, 2F

02/10 19:32, , 3F
寫一個 public method 讓另一個dialog call
02/10 19:32, 3F

02/11 13:46, , 4F
可是會出現 An invalid argument was encountered
02/11 13:46, 4F

02/11 13:46, , 5F
我需要再PO文敘述嗎?
02/11 13:46, 5F
文章代碼(AID): #1DKY-adA (C_and_CPP)
文章代碼(AID): #1DKY-adA (C_and_CPP)