龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > VC开发 >

VC中自动改变控件位置和大小的对话框类(6)

时间:2009-12-30 15:42来源:未知 作者:admin 点击:
分享到:
// 对话框不能小于初始大小 int iWidth = lpRect-right - lpRect-left; int iHeight = lpRect-bottom - lpRect-top; if (iWidth = m_iMinWidth) lpRect-right = lpRect-left + m_iMinWidth; if(iHeight =

 // 对话框不能小于初始大小

 int iWidth = lpRect->right - lpRect->left;
 int iHeight = lpRect->bottom - lpRect->top;

 if (iWidth <= m_iMinWidth)
  lpRect->right = lpRect->left + m_iMinWidth;

 if(iHeight <= m_iMinHeight)
  lpRect->bottom = lpRect->top + m_iMinHeight;
}

BOOL ClxDialog::SetControlProperty(PDLGCTLINFO lp, int nElements)
{
 // 设置控件数组信息

 if (NULL == lp)
  return FALSE;

 if (nElements <= 0)
  return FALSE;

 m_pControlArray = lp;
 m_iControlNumber = nElements;

 return TRUE;
}

void ClxDialog::ShowSizeIcon(BOOL bShow /*=NULL*/)
{
 m_bShowSizeIcon = bShow;
}

收藏文章
表情删除后不可恢复,是否删除
取消
确定
图片正在上传,请稍后...
评论内容为空!
还没有评论,快来抢沙发吧!
按钮 内容不能为空!
立刻说两句吧! 查看0条评论
精彩图集

赞助商链接