AfxMessageBox的問題

用VS20005寫messagebox居然出錯了~

AfxMessageBox("update");

錯誤 error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types 

解決方式是改成 AfxMessageBox(_T("update")); 

原因是如果程序中有define   _UNICODE,則可用_T  或者  _TEXT將後面的內容轉爲UNICODE格式字符串,否則和不用_T一樣  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章