[問題] windows form 下的滑鼠事件

看板C_and_CPP (C/C++)作者 (麵T)時間12年前 (2013/09/23 01:06), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) VC++2008 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) OPenGL 問題(Question): windows form 中的滑鼠事件寫法 預期的正確結果(Expected Output): 得到滑鼠座標 程式碼(Code):(請善用置底文網頁, 記得排版) void mousebutton(int button, int state, int x, int y ){ MessageBox::Show("X:"+x.ToString()+",Y:"+y.ToString()); } bool InitGL(GLvoid) // All setup for opengl goes here { glutMouseFunc(mousebutton); ...略... return TRUE; } 完整程式: http://www.mediafire.com/download/e4c384s3mtkck0d/OpenGL_on_a_Windows_Form.zip 無法編譯過,錯誤訊息: error C3867: 'OpenGLForm::COpenGL::mousebutton': 函式呼叫遺漏引數清單,請用 '&OpenGLForm::COpenGL::mousebutton' 建立成員的指標 按照它所要求的修改之後又會出現另一項錯誤訊息: error C3374: 必須在建立委派執行個體的內容中,才可以接受 'OpenGLForm::COpenGL::mousebutton' 的位址 -- 我是麵T,哩賀 http://ppt.cc/-eS5 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.117.196.151
文章代碼(AID): #1IFoEpuh (C_and_CPP)
文章代碼(AID): #1IFoEpuh (C_and_CPP)