Re: [問題] 在vc2005下開發windows mobile應用程式 …

看板Programming作者 (睡魔)時間18年前 (2007/03/08 09:55), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
※ 引述《cptl (CPTL)》之銘言: : 小弟目前在 vc2005 下開發windows mobile 5.0 應用程式 : 我在專案裡寫了一個繼承CWnd 的類別物件(先簡稱此物件叫 wnd ), : 並在 View 視窗裡呼叫 wnd->CreateControl(...) : 並且把程式丟到emulator上是能正常運作的 : 但當我把這個類別作成dll檔, 和應用程式的執行檔一起丟到emulator上時 : 我先在呼叫dll檔的一個showMessage函數, 確定dll是能正確運作的!! : 但只要呼叫到 dll類別裡 wnd->CreateControl() 這個函數時 : 就會在emulator上跳出一個錯誤視窗, 上面寫著:Debug Assertion Failed : 並且有 Abort, Retry, Ignore 三種回應此錯誤方式 : 讓我困惑的是!! 明明把這個class加在應用程式中是完全沒問題的! : 但把它抽離出來以dll方式使用時, 只要emulator一呼叫到繼承 CWnd 的CreateContrl函 : 數, : 馬上就出現錯誤訊息!! : 想請問這是怎麼回事呢? : 既然在應用程式中emulator能正確執行, 因此我想class的寫法應該沒問題~ : 會不會因為製作emulator用的dll, 所以某些額外環境要另外設定呀!? : (我在選作dll專案時, 己經有選擇 MFC smart Device 的dll專案) : 己經被這個問題卡住好幾天了,希望前輩們能稍微幫忙指點~ : 感激不盡!!! btw... CreateControl does not create a control handle if the control's "Visible" property is false. You can either call the CreateHandle method or access the Handle property to create the control's handle regardless of the control's visibility, but in this case, no window handles are created for the control's children. 你有確定當呼叫CreateControl()時Visible屬性是true嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 202.134.126.84
文章代碼(AID): #15xspuhl (Programming)
文章代碼(AID): #15xspuhl (Programming)