Reputation: 11
I am facing a problem where I am getting the device context as NULL in OnEraseBkgnd fucntion handler. I have OnEraseBkgnd handler in my custom Tab control class which is inherited from CTabCtrl, I am also getting the same problem in DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) of another custom button control class which is inherited from CButton.
Device Context is getting NULL sporadically and not always. Please let me know if any idea why this device context would have become NULL.
Upvotes: 1
Views: 311