You are working as an application developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. Domain.com uses Visual Studio 2005 as an application platform. Domain.com consists of a Development department.
You as the developer of Domain.com use a client computer named Certkiller -WS115 as developing collateral.
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.
B: The UserPaint flag should be set for the OnPaint method to be called.