|
|
模仿 Mode Switch Demo - Part 2 程序写的一个全屏和窗口的切换程序
按切换时直接推出程序了 为什么???
切换程序
void SwitchMode(bool bExclusive, int nWidth, int nHeight, int nBPP)
{
// destroy any existing surfaces and clippers
DestroySurfaces();//释放页面
DestroyDirectDraw();//释放ddraw对象
// destroy the main window and create it again
DestroyMainWindow();//销毁主窗口
CreateMainWindow();//创建主窗口
// make any changes to the window
AdjustMainWindow(bExclusive, nWidth, nHeight);//调整窗口
// create new surfaces and change the cooperative level and display mode
CreateDirectDraw();//创建ddraw对象
CreateSurfaces(bExclusive, nWidth, nHeight, nBPP);//ddraw初始化
}
附件是 Mode Switch Demo - Part 2 (源程序无法编译运行 被我该了头文件和LINK 还是不能运行 高手帮忙改下 如果哪个高手作过类似程序 能否发分给我看看 写拉
我的油箱 shenjiajia1225@gmail.com) |
|