怎么样把窗口的上半部分移掉 留下下半部分 急 我想把窗口上半部分的画面移掉 下半部分保持不懂MoveWindow(hDlg, 0, -150, 480, 588, TRUE );但是使用MoveWindow以后就把整个窗口都移动了的怎么解决? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把你窗口上的所有子控件上移,MoveWindow/SetWindowPos(); 不行呀 一用movewindow窗口整体都移上去了的 我就只想移一半 另一半维持原样不动 有什么方法么? 定义两个Dialog,去掉边框(Dialog Frame 用None),然后你随便搞吧,想组合就把两个连到一块,想分开就把两个窗体拆开,想隐藏那个都行 void CTestDlg::OnButton1() { // TODO: Add your control notification handler code here CString str; if(GetDlgItemText(IDC_BUTTON1, str), str == "收缩<<") { SetDlgItemText(IDC_BUTTON1,"扩展>>"); } else { SetDlgItemText(IDC_BUTTON1,"收缩<<"); } static CRect rectLarge; static CRect rectSmall; if(rectLarge.IsRectNull()) { CRect rectSeparator; GetWindowRect(&rectLarge); GetDlgItem(IDC_SEPARATOR)->GetWindowRect(&rectSeparator); rectSmall.left=rectLarge.left; rectSmall.top=rectLarge.top; rectSmall.right=rectLarge.right; rectSmall.bottom=rectSeparator.bottom; } if(str=="收缩<<") { SetWindowPos(NULL,0,0,rectSmall.Width(),rectSmall.Height(), SWP_NOMOVE | SWP_NOZORDER); } else { SetWindowPos(NULL,0,0,rectLarge.Width(),rectLarge.Height(), SWP_NOMOVE | SWP_NOZORDER); }}从 孙鑫老师 的教程上的一段代码 SetWindowPos 把窗口高度缩小一半,然后直接ScrollWindow向上滚动原来高度的一半,子窗口也会跟着滚动。我估计应该可以。 c#中Windows如何向service发消息?最好可以使用SendMessage VC 按钮字体 招聘VC程序员视频软件及Skin开发 谁有关于HOOK的教程或书籍,麻烦告诉下名称或地址? CStdioFile 一个字符一个字符的读文件,对某些乱码文件没读完就退出了,为什么? 记录指针为什么无法移动啊?? 响应框架程序最小化的消息是什么? 怎样将一个Wav文件的声音数据读入到一个Buf中? 请问在VC 中如何读写文件速度最快? 學Hou Sir《深入淺出MFC》之問題2 D3D画线怎么画? vc error PRJ0002 错误
我就只想移一半 另一半维持原样不动 有什么方法么?
{
// TODO: Add your control notification handler code here
CString str;
if(GetDlgItemText(IDC_BUTTON1, str), str == "收缩<<")
{
SetDlgItemText(IDC_BUTTON1,"扩展>>");
}
else
{
SetDlgItemText(IDC_BUTTON1,"收缩<<");
} static CRect rectLarge;
static CRect rectSmall;
if(rectLarge.IsRectNull())
{
CRect rectSeparator;
GetWindowRect(&rectLarge);
GetDlgItem(IDC_SEPARATOR)->GetWindowRect(&rectSeparator); rectSmall.left=rectLarge.left;
rectSmall.top=rectLarge.top;
rectSmall.right=rectLarge.right;
rectSmall.bottom=rectSeparator.bottom;
}
if(str=="收缩<<")
{
SetWindowPos(NULL,0,0,rectSmall.Width(),rectSmall.Height(),
SWP_NOMOVE | SWP_NOZORDER);
}
else
{
SetWindowPos(NULL,0,0,rectLarge.Width(),rectLarge.Height(),
SWP_NOMOVE | SWP_NOZORDER);
}
}
从 孙鑫老师 的教程上的一段代码