You are busy creating an extended control deriving class from TextBox. You did override the OnPaint method of the TextBox, but it never is called. What should you do to set or unset a flag in the ControlStyles enumeration to solve this problem?
A.
You should set the AllPaintInWmPaint flag.
B.
You should unset the UserPaint.
C.
You should unset the AllPaintInWmPaint flag.
D.
You should set the UserPaint.
Explanation:
The UserPaint flag shows that the control paints itself then having the operating system performs the job. If the flag is not set, the OnPaint method is not called.Incorrect Answers:
A, C: It does not matter if you set or unset the AllPaintInWmPaint flag. It shows that the control should reduce flickering the WM_ERASEBKGND window message.