如何给comboBox的下拉列表加上水平滚动条或改变其宽度
5个回答
2013-12-19
展开全部
CB_SETHORIZONTALEXTENT是设置宽度.An application sends the CB_SETHORIZONTALEXTENT message to set the width, in pixels, by which a list box can be scrolled horizontally (the scrollable width). If the width of the list box is smaller than this value, the horizontal scroll bar horizontally scrolls items in the list box. If the width of the list box is equal to or greater than this value, the horizontal scroll bar is hidden or, if the combo box has the CBS_DISABLENOSCROLL style, disabled.wParam = (WPARAM) cxExtent; // scrollable width of list box, in pixels CB_SETHORIZONTALEXTENT lParam = 0; // not used, must be zero ParameterscxExtentCB_GETHORIZONTALEXTENT是取得宽度.Specifies the scrollable width of the list box, in pixels. Return ValuesNo return value.
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-12-19
展开全部
TControl.Perform----------------------------------------------------------------Responds as if the control received a specified Windows message. function Perform(Msg: Cardinal; WParam, LParam: Longint): Longint;eg:Description----------------------------------------------------------------Call Perform to bypass the Windows message queue and send a message directly to the control抯 window procedure.Perform fills a message record (of type TMessage) with the message ID passed in the Msg parameter, the message parameters passed in WParam and LParam, and a result field of zero. Perform then passes the message record to the WindowProc method for processing.procedrue Tform1.FormShow(Sender : Tobjects)begin comboBox1.Perform(CB_SETDROPPEDWIDTH, 100, 0);end;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-12-19
展开全部
向它发CB_GETHORIZONTALEXTENT消息便可,如用MFC,则CComboBox::SetHorizontalExtent
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-12-19
展开全部
我想只能先看ComboBox的源码,在本身持续一个。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-12-19
展开全部
yjq(渤海海峡)可否把你的控件借我用用?我正缺。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询