//调整控件 void RectifyControl() { this.Left = m_BasicPoint.X - m_nWidth; this.Top = m_BasicPoint.Y - CONTROL_HEIGHT; this.Width = m_nWidth; this.Height = CONTROL_HEIGHT; Rectangle rcButton = new Rectangle(); IntPtr hDwp = GameGraphics.BeginDeferWindowPos(32); const uint uFlags = GameGraphics.SWP_NOACTIVATE | GameGraphics.SWP_NOZORDER | GameGraphics.SWP_NOCOPYBITS | GameGraphics.SWP_NOSIZE; //最大按钮 //m_btMaxScore.GetWindowRect(&rcButton); rcButton.Width = 47; rcButton.Height = 28; GameGraphics.DeferWindowPos(hDwp, m_btMaxScore.Handle, 0, 6, 7, 0, 0, uFlags); //最小按钮 GameGraphics.DeferWindowPos(hDwp, m_btMinScore.Handle, 0, 6, CONTROL_HEIGHT - rcButton.Height - 9, 0, 0, uFlags); //确定按纽 GameGraphics.DeferWindowPos(hDwp, m_btOK.Handle, 0, m_nWidth - rcButton.Width - 6, 7, 0, 0, uFlags); //加注按钮 GameGraphics.DeferWindowPos(hDwp, m_btCancel.Handle, 0, m_nWidth - rcButton.Width - 6, CONTROL_HEIGHT - rcButton.Height - 9, 0, 0, uFlags); //结束移动 GameGraphics.EndDeferWindowPos(hDwp); return; }