etCheckedMark();Р SetCheckedColor();//设置颜色菜单选项的选中状态Р SetCheckedSound();//设置声音菜单选项的选中状态Р?//?SetCheckedCheat();Р?}Р}Р3.2.2初始化游戏Р在窗体的初始化函数中调用了InitGame()函数,该函数用于初始化游戏,实现如下:Рvoid CMineWnd::InitGame() // 游戏的初始化Р{Р?LoadBitmap(); //载入位图资源Р?m_nLeaveNum = m_uMineNum;//剩余雷数Р?m_uSpendTime = 0;//花费的时间Р?m_uBtnState = BUTTON_NORMAL;//状态按钮初始化为正常态Р?m_uGameState = GS_WAIT;//游戏状态为等待状态Р?if (m_uTimer) //定时器已打开Р?{Р KillTimer(ID_TIMER_EVENT);//关闭定时器Р m_uTimer = 0;//初始化时间Р?}Р?m_pNewMine = NULL;//新单击的方块Р?m_pOldMine = NULL;//上次单击的方块Р?FreeMines();Р?//将所有的方块初始化为原始状态Р?for (UINT i = 0; i<m_uYNum; i++) Р?{Р for (UINT j = 0; j<m_uXNum; j++)Р {Р m_pMines[i][j].uRow = i;Р m_pMines[i][j].uCol = j;Р m_pMines[i][j].uState = STATE_NORMAL;//正常态Р m_pMines[i][j].uAttrib = ATTRIB_EMPTY;Р m_pMines[i][j].uOldState = STATE_NORMAL;Р }