使呈现上下文不是当前

若要从线程分离呈现上下文,请使其不是当前上下文。 为此,可以调用 wglMakeCurrent 函数,并将参数设置为 NULL。 下面是此简单任务的一个示例。

// detach the current rendering context from the thread  
wglMakeCurrent(NULL, NULL);