TabCtrl

1. Tab Control Messages  
 TCM_ADJUSTRECT  
 TCM_DELETEALLITEMS  
 TCM_DELETEITEM  
 TCM_DESELECTALL  
 TCM_GETCURFOCUS  
 TCM_GETCURSEL  
 TCM_GETEXTENDEDSTYLE  
 TCM_GETIMAGELIST  
 TCM_GETITEM  
 TCM_GETITEMCOUNT  
 TCM_GETITEMRECT  
 TCM_GETROWCOUNT  
 TCM_GETTOOLTIPS  
 TCM_GETUNICODEFORMAT  
 TCM_HIGHLIGHTITEM  
 TCM_HITTEST  
 TCM_INSERTITEM  
 TCM_REMOVEIMAGE  
 TCM_SETCURFOCUS  
 TCM_SETCURSEL  
 TCM_SETEXTENDEDSTYLE  
 TCM_SETIMAGELIST  
 TCM_SETITEM  
 TCM_SETITEMEXTRA  
 TCM_SETITEMSIZE  
 TCM_SETMINTABWIDTH  
 TCM_SETPADDING  
 TCM_SETTOOLTIPS  
 TCM_SETUNICODEFORMAT  

2. Tab Control Notification Messages  
 NM_CLICK  
 NM_RCLICK  
 NM_RELEASEDCAPTURE  
 TCN_GETOBJECT  
 TCN_KEYDOWN  
 TCN_SELCHANGE  
 TCN_SELCHANGING  

 父窗口通过WM_COMMAND消息接收:

 wNotifyCode = HIWORD(wParam); // notification code
 wID = LOWORD(wParam);         // item, control, or accelerator identifier
 hwndCtl = (HWND) lParam;      // handle of control
 
 
3. Tab Control Styles
 TCS_BOTTOM
 Version 4.70. Tabs appear at the bottom of the control.
 This value equals TCS_RIGHT.
 This style is not supported if you use ComCtl32.dll version 6.

 TCS_BUTTONS
 Tabs appear as buttons, and no border is drawn around the display area.

 TCS_FIXEDWIDTH
 All tabs are the same width. This style cannot be combined with the TCS_RIGHTJUSTIFY style.

 TCS_FLATBUTTONS
 Version 4.71. Selected tabs appear as being indented into the background while other tabs appear as being on the same plane as the background. This style only affects tab controls with the TCS_BUTTONS style.

 TCS_FOCUSNEVER
 The tab control does not receive the input focus when clicked.

 TCS_FOCUSONBUTTONDOWN
 The tab control receives the input focus when clicked.

 TCS_FORCEICONLEFT
 Icons are aligned with the left edge of each fixed-width tab. This style can only be used with the TCS_FIXEDWIDTH style.

 TCS_FORCELABELLEFT
 Labels are aligned with the left edge of each fixed-width tab; that is, the label is displayed immediately to the right of the icon instead of being centered. This style can only be used with the TCS_FIXEDWIDTH style, and it implies the TCS_FORCEICONLEFT style.

 TCS_HOTTRACK
 Version 4.70. Items under the pointer are automatically highlighted. You can check whether or not hot tracking is enabled by calling SystemParametersInfo.

 TCS_MULTILINE
 Multiple rows of tabs are displayed, if necessary, so all tabs are visible at once.

 TCS_MULTISELECT
 Version 4.70. Multiple tabs can be selected by holding down when clicking. This style must be used with the TCS_BUTTONS style.

 TCS_OWNERDRAWFIXED
 The parent window is responsible for drawing tabs.

 TCS_RAGGEDRIGHT
 Rows of tabs will not be stretched to fill the entire width of the control. This style is the default.

 TCS_RIGHT
 Version 4.70. Tabs appear vertically on the right side of controls that use the TCS_VERTICAL style. This value equals TCS_BOTTOM. This style is not supported if you use visual styles.

 TCS_RIGHTJUSTIFY
 The width of each tab is increased, if necessary, so that each row of tabs fills the entire width of the tab control. This window style is ignored unless the TCS_MULTILINE style is also specified.

 TCS_SCROLLOPPOSITE
 Version 4.70. Unneeded tabs scroll to the opposite side of the control when a tab is selected.

 TCS_SINGLELINE
 Only one row of tabs is displayed. The user can scroll to see more tabs,
 if necessary. This style is the default.

 TCS_TABS
 Tabs appear as tabs, and a border is drawn around the display area.
 This style is the default.

 TCS_TOOLTIPS
 The tab control has a ToolTip control associated with it.

 TCS_VERTICAL
 Version 4.70. Tabs appear at the left side of the control, with tab text displayed vertically. This style is valid only when used with the TCS_MULTILINE style. To make tabs appear on the right side of the control, also use the TCS_RIGHT style. This style is not supported if you use ComCtl32.dll version 6.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值