怪异:组合框不能正常显示的问题。

megzhou_10660 2006-09-04 11:14:36
最近在一个工程的时候,用到了一个组合框资源,组合框的大小托得足够大的。最初我在我15英寸液晶显示器上显示完全正常,但拿到19英寸上去的适应,为了适应屏幕大小(整个对话框占满真个屏幕),所以考虑更加屏幕大小自适应调整对话框上资源的尺寸。在对话框的OnSizezhon其主要代码如下:

CRect rectChildSaved;

//get the control on the reason property page
CWnd *pWndChild = GetWindow(GW_CHILD);
while(pWndChild)
{
//get the size of the control when sizing
rectChildSaved = listRect.GetNext(mP);
rectChildSaved.left = rectDlgNow.left + (int)((rectChildSaved.left - rectDlgSaved.left) * fRateScaleX);
rectChildSaved.top = rectDlgNow.top + (int)((rectChildSaved.top - rectDlgSaved.top) * fRateScaleY);
rectChildSaved.right = rectDlgNow.right + (int)(rectChildSaved.right - rectDlgSaved.right) * fRateScaleX);
rectChildSaved.bottom = rectDlgNow.bottom + (int)
rectChildSaved.bottom - rectDlgSaved.bottom)
* fRateScaleY);

//coordinate transform
ScreenToClient(rectChildSaved);

//change to the new position
pWndChild->MoveWindow(rectChildSaved);

//change the font size of the control
pWndChild->SetFont(pCFont);

//for the next control
pWndChild = pWndChild->GetNextWindow();
}

这样一样,原本可以正常下拉的Combo box 拉不下来了。感觉就像Combo box的高度设置不够一样。

请问大侠:我错在那里啊,该咱办呢?

谢谢!
...全文
77 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧