再问,无边框对话框如何改变窗体大小?

microchu 2005-09-21 12:17:04
想要在窗体右侧拉动窗体,变化窗体大小,
前面问过了,但还是不知道该怎样下手?
要在Mouse down 事件中写MoveWindow代码吗?
应该怎样做啊?
请求高手不吝赐教!!!谢谢了,在此!
...全文
221 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
taianmonkey 2005-09-22
  • 打赏
  • 举报
回复
m_rcChange = m_rcMain;
//get the window style and add its caption
LONG style = GetWindowLong(m_hWnd,GWL_STYLE);
style |=WS_CAPTION;
//set the showing window style
SetWindowLong(m_hWnd,GWL_STYLE,style);
//show window
SetWindowPos(NULL,m_rcChange.left,m_rcChange.top,m_rcChange.right - m_rcChange.left,m_rcChange.bottom-m_rcChange.top,SWP_NOZORDER);
taianmonkey 2005-09-22
  • 打赏
  • 举报
回复
GetWindowRect(&m_rcMain);//restore the src screen's size;
//delete the showing window's caption
LONG style = GetWindowLong(m_hWnd,GWL_STYLE);
style &=~WS_CAPTION;
//set the window's show sytle
SetWindowLong(m_hWnd,GWL_STYLE,style);
//get the screen's pixel
int screenX = GetSystemMetrics(SM_CXSCREEN);
int screenY = GetSystemMetrics(SM_CYSCREEN);
//show window
SetWindowPos(NULL,0,0,screenX,screenY,SWP_NOZORDER);
rageliu 2005-09-22
  • 打赏
  • 举报
回复
属性里面Border选Resize
legendhui 2005-09-22
  • 打赏
  • 举报
回复
对话框属性的Style页下的Border里选择Resizing
i_noname 2005-09-21
  • 打赏
  • 举报
回复
ModifyStyle(0,WS_THICKFRAME);
microchu 2005-09-21
  • 打赏
  • 举报
回复
请问有例子吗?参考参考
goodboyws 2005-09-21
  • 打赏
  • 举报
回复
在MouseMove判断鼠标是否按下及鼠标位置是否在右边,写MoveWindow代码
Kudeet 2005-09-21
  • 打赏
  • 举报
回复
对话框属性的Style页下的Border里选择Resize即可

15,980

社区成员

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

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