我几年前写了一个免费游戏: http://www.walkover.org。对于大厅和菜单,它使用类似win32的普通对话框。当实际游戏开始时,它使用OpenGL。
现在,在Windows 7上,当实际游戏开始时,它会关闭窗口aero玻璃,并在游戏结束时重新打开。
有什么办法可以防止这种情况发生吗?是否有一些特殊标志可以保持玻璃状态?(对于更新的版本,我一直在使用DirectX,这种情况不会发生。)也许我需要在某个地方指定(新的)标志?
我正在使用这个pixelformatdescriptor:
现在,在Windows 7上,当实际游戏开始时,它会关闭窗口aero玻璃,并在游戏结束时重新打开。
有什么办法可以防止这种情况发生吗?是否有一些特殊标志可以保持玻璃状态?(对于更新的版本,我一直在使用DirectX,这种情况不会发生。)也许我需要在某个地方指定(新的)标志?
我正在使用这个pixelformatdescriptor:
static PIXELFORMATDESCRIPTOR pfd =
{
sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd
1, // version number
PFD_DRAW_TO_WINDOW | // support window
PFD_SUPPORT_OPENGL | // support OpenGL
PFD_DOUBLEBUFFER, // double buffered
PFD_TYPE_RGBA, // RGBA type
32, // 24-bit color depth
0, 0, 0, 0, 0, 0, // color bits ignored
0, // no alpha buffer
0, // shift bit ignored
0, // no accumulation buffer
0, 0, 0, 0, // accum bits ignored
0, // 32-bit z-buffer
0, // no stencil buffer
0, // no auxiliary buffer
PFD_MAIN_PLANE, // main layer
0, // reserved
0, 0, 0 // layer masks ignored
};