使用ModifyStyle个性COMBOX属性的问题

lookfar 2001-11-15 10:07:06
下面一段代码执行后没有反应
if(!this->m_Ccb_ConditionValue.GetStyle() & CBS_DROPDOWN)) {
if(!this->m_Ccb_ConditionValue.ModifyStyle(0,CBS_DROPDOWN,1) {
}
}
使用ModifyStyleEx也没有反应。
请各位高手研究指点.
...全文
123 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
kingtsui 2002-01-16
  • 打赏
  • 举报
回复
ModifyStyle对有些属性可以修改,有些不可以修改
具体可以看一下SetWindowLong函数和各个控件/Window的对style的定义
蒋晟 2002-01-16
  • 打赏
  • 举报
回复

Frank_Xu 2002-01-16
  • 打赏
  • 举报
回复
ModifyStyle( ) 是不是不能將 CBS_DROPDWON 改變為 CBS_DROPDWONLIST ?
xiaoxiaohan 2002-01-16
  • 打赏
  • 举报
回复
运算符'!'的优先级比'&'的高,所以应该为
if(!(this->m_Ccb_ConditionValue.GetStyle() & CBS_DROPDOWN)) {
if(!this->m_Ccb_ConditionValue.ModifyStyle(0,CBS_DROPDOWN,1)) {
}
}

蒋晟 2002-01-16
  • 打赏
  • 举报
回复
destroy&recreate
Frank_Xu 2002-01-16
  • 打赏
  • 举报
回复
U P
MFC开发过程序所需的ModifyStyle(needDelStyle,needAddStyle,SWP_FRAMECHANGED); Sytel: WS_BORDER Creates a window that has a border. WS_CAPTION Creates a window that has a title bar (implies the WS_BORDER style). Cannot be used with the WS_DLGFRAME style. WS_CHILD Creates a child window. Cannot be used with the WS_POPUP style. WS_CHILDWINDOW Same as the WS_CHILD style. WS_CLIPCHILDREN Excludes the area occupied by child windows when you draw within the parent window. Used when you create the parent window. WS_CLIPSIBLINGS Clips child windows relative to each other; that is, when a particular child window receives a paint message, the WS_CLIPSIBLINGS style clips all other overlapped child windows out of the region of the child window to be updated. (If WS_CLIPSIBLINGS is not given and child windows overlap, when you draw within the client area of a child window, it is possible to draw within the client area of a neighboring child window.) For use with the WS_CHILD style only. WS_DISABLED Creates a window that is initially disabled. WS_DLGFRAME Creates a window with a double border but no title. WS_GROUP Specifies the first control of a group of controls in which the user can move from one control to the next with the arrow keys. All controls defined with the WS_GROUP style FALSE after the first control belong to the same group. The next control with the WS_GROUP style starts the next group (that is, one group ends where the next begins). WS_HSCROLL Creates a window that has a horizontal scroll bar. WS_ICONIC Creates a window that is initially minimized. Same as the WS_MINIMIZE style. WS_MAXIMIZE Creates a window of maximum size. WS_MAXIMIZEBOX Creates a window that has a Maximize button. WS_MINIMIZE Creates a window that is initially minimized. For use with the WS_OVERLAPPED style only. WS_MINIMIZEBOX Creates a window that has a Minimize button. WS_OVERLAPPED Creates an overlapped window. An overlapped window usually has a caption a

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

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