This is the callback that replaces the FillRect GDI function with one minor change - instead of an HBRUSH, the function uses a COLORREF.
Handle of the device context passed to the paint function.
The rectangle coordinates to fill.
The color to use when filling the rectangle.
Void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. (This is the same pointer that you pass in the pUserData parameter of the PAINTCALLBACKDATA structure.)
The return values are the same as the return values for the corresponding GDI function.
The internal display engine calls your callback function if you override the corresponding GDI function in the PAINTCALLBACKDATA structure.
pDisplay is the pDisplay member from the PAINTCALLBACKDATA structure that you passed to the paint function. The default callbacks expect it to be an HDC handle. But, if you override all the paint callbacks, it can be a pointer of any type you want.
Refer to the Microsoft documentation for the values you are expected to return and for the meaning of the parameters before pUserData.
Required DLLs and Libraries
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application
For an example, refer to L_PaintDCCallback.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries