你好,用SetWindowLong给CEdit控件设置ES_MULTILINE的属性为什么不好用呢???其他的都好用啊。
LONGnn=GetWindowLong(m_Edit,GWL_STYLE);SetWindowLong(m_Edit.m_hWnd,GWL_STYLE,WS_CHILD...
LONG nn=GetWindowLong(m_Edit,GWL_STYLE);
SetWindowLong(m_Edit.m_hWnd,GWL_STYLE,WS_CHILD|WS_VISIBLE|ES_MULTILINE|ES_LEFT );
nRect.left += 16;
nRect.right -= 20;
m_Edit.SetRect(&nRect);//还是不起作用! 展开
SetWindowLong(m_Edit.m_hWnd,GWL_STYLE,WS_CHILD|WS_VISIBLE|ES_MULTILINE|ES_LEFT );
nRect.left += 16;
nRect.right -= 20;
m_Edit.SetRect(&nRect);//还是不起作用! 展开
2个回答
展开全部
关于SetWindowLong,remark部分有这么一段话
Certain window data is cached, so changes you make using SetWindowLong will not take effect until you
call the SetWindowPos function. Specifically, if you
change any of the frame styles, you must call SetWindowPos with the SWP_FRAMECHANGED flag for the cache to be
updated properly.
你说的不起作用指的是控件的位置没有移动吗?我对MFC不熟,移动的话我记得好像是MoveWindow……SetRect我没用过
Certain window data is cached, so changes you make using SetWindowLong will not take effect until you
call the SetWindowPos function. Specifically, if you
change any of the frame styles, you must call SetWindowPos with the SWP_FRAMECHANGED flag for the cache to be
updated properly.
你说的不起作用指的是控件的位置没有移动吗?我对MFC不熟,移动的话我记得好像是MoveWindow……SetRect我没用过
来自:求助得到的回答
展开全部
Certain window data is cached, so changes you make using SetWindowLong will not take effect until you
call the SetWindowPos function. Specifically, if you
change any of the frame styles, you must call SetWindowPos with the SWP_FRAMECHANGED flag for the cache to be
updated properly.
上面这段话已经说了,你还需要调用SetWindowPos 才能使得设置生效!
call the SetWindowPos function. Specifically, if you
change any of the frame styles, you must call SetWindowPos with the SWP_FRAMECHANGED flag for the cache to be
updated properly.
上面这段话已经说了,你还需要调用SetWindowPos 才能使得设置生效!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询