摘要:
最近在写一个控件CMenuButton,初衷是提供设置偏移量的接口,可是ASSERT总是中断,调试发现::GetClientRect()返回的rect都是0值。Google了一下,原来:Q:“为何在OnCreate调用取出的就是0 呢 ?在OnInitialUpdate中是可以调用的,返回数据也是正确的 ”A:“OnCreate时还没创建出客户区 ”void CMenuButton::SetOffset(int OffsetL, int OffsetR, int OffsetTop, int OffsetBottom){ //if out of client bound, then hold 阅读全文
posted @ 2013-11-26 12:23
Tup
阅读(685)
评论(0)
推荐(0)