Custom Draw services

           Custom Draw services allow the custom to draw the control on his own, which provide by many common controls. As follows:
Header controls
List-view controls
Rebar controls
Toolbar controls
ToolTip controls
Trackbar controls
Tree-view controls
           It allow an application greater flexibility in customizing a control's appearence. The control that support custom draw send NM_CUSTOMDRAW notification message to its parent window about drawing operations. Like many notification messages, NM_CUSTOMDRAW notification are sent as WM_NOTIFY message.
           The lParam parameter of a custom draw notification message will be the address of an  NMCUSTOMDRAW structure or a control-specific structure that contains an NMCUSTOMDRAW structure as its first member.
            The current stage of the paint cycle(the process of a control painting or erasing itself is called a paint cycle) is referred to as the drawstage member in the NMCUSTOMDRAW structure.
Current drawing stage. This value is one of the following.
Global Values:
CDDS_POSTERASE
 After the erasing cycle is complete.
CDDS_POSTPAINT
 After the painting cycle is complete.
CDDS_PREERASE
 Before the erasing cycle begins.
CDDS_PREPAINT
 Before the painting cycle begins.
Item-specific Values:
CDDS_ITEM
 Indicates that the dwItemSpec, uItemState, and lItemlParam members are valid.
CDDS_ITEMPOSTERASE
 After an item has been erased.
CDDS_ITEMPOSTPAINT
 After an item has been drawn.
CDDS_ITEMPREERASE
 Before an item is erased.
CDDS_ITEMPREPAINT
 Before an item is drawn.
CDDS_SUBITEM
 Version 4.71. Flag combined with CDDS_ITEMPREPAINT or CDDS_ITEMPOSTPAINT if a subitem is being drawn. This will only be set if CDRF_NOTIFYITEMDRAW is returned from CDDS_PREPAINT.
 
              Your application must process the NM_CUSTOMDRAW notification message and then return a specific value depends on the current drawing stage to inform the control what it must do.
the return values are:
 CDRF_DODEFAULT
 CDRF_NOTIFYITEMDRAW
 CDRF_NOTIFYITEMERASE
 CDRF_NOTIFYPOSTERASE
 CDRF_NOTIFYPOSTPAINT
 CDRF_NEWFONT
 CDRF_NOTIFYSUBITEMDRAW
 CDRF_SKIPDEFAULT
(seeing details,please refer to the MSDN)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值