'Gradient Brush in Native C++?

In c#, you can use drawing2d.lineargradientbrush, but in c++ right now I only found the CreateSolidBrush function. Is there a function in the native gdi dll to create a gradient brush? I couldn't find anything like this at msdn. Thanks



Solution 1:[1]

C# uses GDI+ for Drawing2d. You can use GDI+ in C++ also - MSDN Creating a Linear Gradient

Solution 2:[2]

You would have to use a combination of the Win32 API GradientFill, CreateCompatibleBitmap, and CreatePatternBrush.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Cristian Adam
Solution 2 IInspectable