简体   繁体   中英

Is there a difference between NULL_PEN and PS_NULL?

GetStockObject(NULL_PEN);
CreatePen(PS_NULL, some_width, 0);

What's the difference? At the very least, CreatePen allows for a width argument, so the widths can be different. Aside from that, are there rendering differences between the two when used to draw?

NULL_PEN does not need to be destroyed again.

There's some rumor of an optimization of NULL_PEN, but I suspect it's really checking for PS_NULL. Even if not, no difference in the pixels when you're done.

Prefer NULL_PEN to make your life easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM