msdn的这个解释,是不是突破c++语法了啊
http://msdn.microsoft.com/en-us/library/bb774865(v=vs.85).aspx
CDRF_NOTIFYPOSTERASE
The control will notify the parent after erasing an item. This occurs when dwDrawStage equals CDDS_PREPAINT.
CDRF_NOTIFYPOSTPAINT
The control will notify the parent after painting an item. This occurs when dwDrawStage equals CDDS_PREPAINT.
疑问:
当dwDrawState 等于CDDS_PREPAINT , mfc里的函数的参数*presult 得赋值,
即msdn里说的所谓返回值。
从c/c++的角度来看, 代码大概如此描述:
if( dwDrawState == CDDS_PREPAINT )
{
*presult =;
}
这里怎么赋值? 按照msdn的这种说法, 不知道怎么赋值吧? 得给*presult2个值。
是不是突破了c++了啊。
呵呵
[解决办法]
CDRF_NOTIFYSUBITEMDRAW 实际上这个消息中的英文就已经很明了了, 就是通知绘制每一个子项. NOTIFY SUB ITEM DRAW
CDRF_NOTIFYSUBITEMDRAW
Version 4.71. Your application will receive an NM_CUSTOMDRAW control code with dwDrawStage set to CDDS_ITEMPREPAINT
[解决办法]
CDDS_SUBITEM before each list-view subitem is drawn. You can then specify font and color for each subitem separately or return CDRF_DODEFAULT for default processing. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT.
这是我理解后的翻译: 原文翻译相信你自己也会了.不会可以"有道"
当收到列表自绘消息NM_CUSTOMDRAW的时候, 并且通知码dwDrawStage等于CDDS_ITEMPREPAINT时, 你就可以通过pResult返回CDRF_NOTIFYSUBITEMDRAW来单独指定每一项的字体和颜色,如果此时再通过pResult返回CDRF_DODEFAULT,则会用默认的字体和颜色. 返回之后,会再收到NM_CUSTOMDRAW,并且通知码dwDrawStage为CDDS_ITEMPREPAINT
[解决办法]
CDDS_SUBITEM. 这时你就可以指定每项的字体和颜色了.