- 208
- 0
- 约2.69万字
- 约 74页
- 2016-04-08 发布于江西
- 举报
VC++ Win32 API 编程简介及游戏开发.ppt
WinMain()方法 ---(2) //获取窗体大小 GetClientRect(hAppWnd, g_ClientRect); g_iClientWidth = g_ClientRect.right-g_ClientRect.left; g_iClientHeight = g_ClientRect.bottom-g_ClientRect.top; //将游戏区域分成纵,横均为20块的小方块,并计算每块区域的大小 tableBlockWidth = (g_iClientWidth-2*WALL_WIDTH)/20; tableBlockHeight = (g_iClientHeight-2*WALL_HEIGHT)/20; windowDC=GetDC(NULL); //获取当前主窗口设备与windowDC关联 //创建与windowDC兼容的内存设备环境 bufferDC=CreateCompatibleDC(windowDC); picDC=CreateCompatibleDC(windowDC); endDC=CreateCompatibleDC(windowDC); scoreDC=CreateCompatibleDC(windowDC); //位图的初始化或载入位图 bufferBMP=CreateCompatibleBitmap(windowDC,g_iCli
原创力文档

文档评论(0)