04 2011 档案

CSizingControlBar Error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBarG::* )(CPoint)”转换为>>>
摘要:发现CsizingControlBar是一个很好的实现VC界面的类,下来编译出现如下错误:错误 1 error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBarG::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)” e:\tempstudy\mfcopengl\mfcopengl\scbarg.cpp 57解决:查看CWnd类afx_msg LRESULT OnNcHitTest(CPoint point);而在CSizingControlBar中是afx_msg 阅读全文

posted @ 2011-04-05 18:14 影语者 阅读(2176) 评论(0) 推荐(1)

MFC下的OpenGL
摘要:序:因为要做个2d地图编辑器,决定采用MFC,但是GDI不是很熟,google下终于完成基本MFC下的OpenGL1.首先建个MFC单文档2.加入外部库:opengl32.lib glu32.lib 在XXView.cpp加入头文件 gl.h, glu.h3.在XXView.h加入如下代码: protected: CDC *m_pDC; HGLRC m_hRC;protected: BOOL InitOpenGL(); # 初始化opengl BOOL SetPixelFormat(); # 设置像素格式 void RenderScene(); # 绘制4.首先重载OnCreate消息int 阅读全文

posted @ 2011-04-02 23:25 影语者 阅读(621) 评论(0) 推荐(0)

导航