CreateIcon function user32
Creates an icon that has the specified size, colors, and bit patterns.
To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-createicon.
Implementation
Win32Result<HICON> CreateIcon(
HINSTANCE? hInstance,
int nWidth,
int nHeight,
int cPlanes,
int cBitsPixel,
Pointer<Uint8> lpbANDbits,
Pointer<Uint8> lpbXORbits,
) {
resolveGetLastError();
final result_ = _CreateIcon(
hInstance ?? nullptr,
nWidth,
nHeight,
cPlanes,
cBitsPixel,
lpbANDbits,
lpbXORbits,
);
return .new(value: .new(result_), error: GetLastError());
}