createSolidBrush method

int createSolidBrush(
  1. int hdc
)

Creates a solid brush from this WindowClassColors.

Implementation

int createSolidBrush(int hdc) {
  var textColor = this.textColor;
  if (textColor != null) {
    SetTextColor(hdc, textColor);
  }

  var bgColor = this.bgColor;
  if (bgColor != null) {
    SetBkMode(hdc, BACKGROUND_MODE.OPAQUE);
    SetBkColor(hdc, bgColor);
  }

  return CreateSolidBrush(bgColor ?? textColor ?? RGB(255, 255, 255));
}