1. 可以直接免费从本站下载代码,防止邮件发送不到您的邮箱,或登录不了国外网站
2. 可以设定关键字,当有您关心的代码收录时,邮件通知您
3. 对这里的代码进行评分和评论
4. 可以和大家一起分享你的源代码,得到更多的建议
void GLCanvas2D::OnPaint(System::Windows::Forms::PaintEventArgs^ e) { // Save previous context and make our context current HDC mhOldDC = wglGetCurrentDC(); HGLRC mhOldGLRC = wglGetCurrentContext(); wglMakeCurrent(mhDC, mhGLRC); /* Drawing code goes here .... .... */ // Restore previous context wglMakeCurrent(mhOldDC, mhOldGLRC); }