會員 ![]() | 關於建立視窗的程式(VC++ 6.0)【求助】 以下是我的程式碼 我是照書上打的 不知道為什麼錯兩個 應該跟程式碼無關 只是不知道怎麼設定才可以正常LINK --------------------------------------------------------------------- #include <afxwin.h> //載入afxwin標頭檔 class MyApp : public CWinApp //繼承CWinApp { public: BOOL InitInstance() //程式進入點 { CFrameWnd *Frame = new CFrameWnd(); //建立CFrameWnd物件 m_pMainWnd = Frame; //將m_pMainWnd設定為Frame Frame->Create(NULL,"Hello MFC"); //建立視窗 Frame->ShowWindow(SW_SHOW); return true; } }; MyApp a_app; //建立應用程式物件 --------------------------------------------------------------------- |
回覆 |
會員 ![]() | 你的專案類型對嗎? 在你新增專案時,要選"Win32 Application", 而不是"Win32 Console Application"哦! |
回覆 |
會員 ![]() | main() 或 winmain() 根本沒有主程式的進入點啊... |
回覆 |
會員 ![]() | 引用:
可是我用cpp檔自己做compiler就不行 我是在想跟設定有無關係 我有試過你說的那種選win32 application就可以了 可是我是在想 書上不是這樣用的 我有看過他的檔案 只是設定他沒教 只有範例檔 所以不懂... | |
回覆 |
會員 ![]() | 引用:
但我可以確定 跟main()無關 | |
回覆 |
XML | RSS 2.0 | RSS |
本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。