1、 CPen不需要调用DeleteObject,CPen类的析构函数自己会去调用,当然你主动调用也不错,如果是HPEN的话,就需要自己去调用DeleteObject了。 2. MSDN都说了,没啥异议。 When you no longer need the HBRUSH object call the DeleteObject function to delete it. 3. 如果用Win32 SDK去写的话,一般都是需要自己去调用释放的,Create..和Delete..对应,Get..和Release..对应,不熟悉的话可以参考MSDN文档。
2. MSDN都说了,没啥异议。 When you no longer need the HBRUSH object call the DeleteObject function to delete it.
3. 如果用Win32 SDK去写的话,一般都是需要自己去调用释放的,Create..和Delete..对应,Get..和Release..对应,不熟悉的话可以参考MSDN文档。
谢谢happyparrot版主,养成好习惯就好了,明白了!