''dsmplayer.wxb''

Sub createPlayerButtons()
  Dim col As wxColour
  Select Case theme
  Case 3: col = wxColour(0, 128, 0) 'green
  Case 2: col = wxColour(50, 50, 50) 'grey
  Case Else: col = wxColourCopy(IIf(theme = 1, wxWHITE, musicBackColour))
  End Select

  Dim hoverColour As wxColour = New wxColour(106, 106, 255)
  Dim pen As wxPen = wxPenFromColour(wxWHITE, 2, 0)
  Dim disabledPen As wxPen = wxPenFromColour(wxLIGHT_GREY, 2, 0)
  Dim brush As wxBrush = wxBrush(col, wxSOLID)
  Dim dc As wxMemoryDC = wxMemoryDC()
  Dim path As wxGraphicsPath

'--------------------------------------------------------------------------------------------
'create control buttons
  Dim ex As Integer = FALSE
  If iList["explDown"] != Nothing Then ex = TRUE

  'create explorer down bitmap
  If ex Then ~iList["explDown"]
  iList["explDown"]= New wxEmptyBitmap(rects["expl"].GetWidth(), rects["expl"].GetHeight(), 32)
  iList["explDown"].UseAlpha()
  dc.SelectObject(iList["explDown"])
  Dim gdc As wxGraphicsContext = wxGraphicsContext_CreateFromMemoryDC(dc)
  pen.SetColor(wxWHITE)
  gdc.SetPen(pen)
  gdc.StrokeLine(4 * ps, 5 * ps, 9 * ps, 10 * ps)
  gdc.StrokeLine(9 * ps, 10 * ps, 14 * ps, 5 * ps)

  'explorer down hover bitmap
  If ex Then ~iList["explDownHover"]
  iList["explDownHover"]= New wxEmptyBitmap(rects["expl"].GetWidth(), rects["expl"].GetHeight(), 32)
  iList["explDownHover"].UseAlpha()
  dc.SelectObject(iList["explDownHover"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  pen.SetColor(hoverColour)
  gdc.SetPen(pen)
  gdc.StrokeLine(4 * ps, 5 * ps, 9 * ps, 10 * ps)
  gdc.StrokeLine(9 * ps, 10 * ps, 14 * ps, 5 * ps)

  'explorer up bitmap
  If ex Then ~iList["explUp"]
  iList["explUp"]= New wxEmptyBitmap(rects["expl"].GetWidth(), rects["expl"].GetHeight(), 32)
  iList["explUp"].UseAlpha()
  dc.SelectObject(iList["explUp"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  pen.SetColor(wxWHITE)
  gdc.SetPen(pen)
  gdc.StrokeLine(4 * ps, 9 * ps, 9 * ps, 4 * ps)
  gdc.StrokeLine(9 * ps, 4 * ps, 14 * ps, 9 * ps)

  'explorer down hover bitmap
  If ex Then ~iList["explUpHover"]
  iList["explUpHover"]= New wxEmptyBitmap(rects["expl"].GetWidth(), rects["expl"].GetHeight(), 32)
  iList["explUpHover"].UseAlpha()
  dc.SelectObject(iList["explUpHover"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  pen.SetColor(hoverColour)
  gdc.SetPen(pen)
  gdc.StrokeLine(4 * ps, 9 * ps, 9 * ps, 4 * ps)
  gdc.StrokeLine(9 * ps, 4 * ps, 14 * ps, 9 * ps)

  'tray bitmap
  If ex Then ~iList["tray"]
  iList["tray"]= New wxEmptyBitmap(rects["tray"].GetWidth(), rects["tray"].GetHeight(), 32)
  iList["tray"].UseAlpha()
  dc.SelectObject(iList["tray"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  pen.SetColor(wxWHITE)
  gdc.SetPen(pen)
  gdc.StrokeLine(2 * ps, 2 * ps, 6 * ps, 6 * ps)
  gdc.StrokeLine(6 * ps, 6 * ps, 10 * ps, 2 * ps)
  ~gdc

  'tray hover bitmap
  If ex Then ~iList["trayHover"]
  iList["trayHover"]= New wxEmptyBitmap(rects["tray"].GetWidth(), rects["tray"].GetHeight(), 32)
  iList["trayHover"].UseAlpha()
  dc.SelectObject(iList["trayHover"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  pen.SetColor(hoverColour)
  gdc.SetPen(pen)
  gdc.StrokeLine(2 * ps, 3 * ps, 6 * ps, 7 * ps)
  gdc.StrokeLine(6 * ps, 7 * ps, 10 * ps, 3 * ps)

  'hide bitmap
  If ex Then ~iList["hide"]
  iList["hide"] =  New wxEmptyBitmap(rects["hide"].GetWidth(), rects["hide"].GetHeight(), 32)
  iList["hide"].UseAlpha()
  dc.SelectObject(iList["hide"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  pen.SetColor(wxWHITE)
  gdc.SetPen(pen)
  gdc.StrokeLine(2 * ps, 7 * ps, 6 * ps, 3 * ps)
  gdc.StrokeLine(6 * ps, 3 * ps, 10 * ps, 7 * ps)

  'hide hover bitmap
  If ex Then ~iList["hideHover"]
  iList["hideHover"] =  New wxEmptyBitmap(rects["hide"].GetWidth(), rects["hide"].GetHeight(), 32)
  iList["hideHover"].UseAlpha()
  dc.SelectObject(iList["hideHover"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  pen.SetColor(hoverColour)
  gdc.SetPen(pen)
  gdc.StrokeLine(2 * ps, 7 * ps, 6 * ps, 3 * ps)
  gdc.StrokeLine(6 * ps, 3 * ps, 10 * ps, 7 * ps)

  'play bitmap
  If ex Then ~iList["play"]
  iList["play"] = New wxEmptyBitmap(rects["play"].GetWidth(), rects["play"].GetHeight(), 32)
  iList["play"].UseAlpha()
  dc.SelectObject(iList["play"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  pen.SetColor(col)
  pen.SetWidth(2)
  gdc.SetPen(pen)
  gdc.SetBrush(wxNullBrush)
  path = gdc.CreatePath()
  path.MoveToPoint(5 * ps, 5 * ps)
  path.AddLineToPoint(5 * ps, 13 * ps)
  path.AddLineToPoint(11 * ps, 9 * ps)
  path.CloseSubpath()
  gdc.DrawPath(path)

  'play hover bitmap
  If ex Then ~iList["playHover"]
  iList["playHover"] = New wxEmptyBitmap(rects["play"].GetWidth(), rects["play"].GetHeight(), 32)
  iList["playHover"].UseAlpha()
  dc.SelectObject(iList["playHover"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
'  pen.SetColor(hoverColour)
  gdc.SetPen(pen)
  gdc.SetBrush(brush)
  path = gdc.CreatePath()
  path.MoveToPoint(5 * ps, 5 * ps)
  path.AddLineToPoint(5 * ps, 13 * ps)
  path.AddLineToPoint(11 * ps, 9 * ps)
  path.CloseSubpath()
  gdc.DrawPath(path)

  'pause bitmap
  For i = 1 To 3
    Select Case i
    Case 1
      'pause bitmap
      If ex Then ~ iList["pause"]
      iList["pause"] = New wxEmptyBitmap(rects["pause"].GetWidth(), rects["pause"].GetHeight(), 32)
      iList["pause"].UseAlpha()
      dc.SelectObject(iList["pause"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(pen)
      gdc.SetBrush(wxNullBrush)

    Case 2
      'pause hover bitmap
      If ex Then ~iList["pauseHover"]
      iList["pauseHover"] = New wxEmptyBitmap(rects["pause"].GetWidth(), rects["pause"].GetHeight(), 32)
      iList["pauseHover"].UseAlpha()
      dc.SelectObject(iList["pauseHover"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(pen)
      gdc.SetBrush(brush)

    Case 3
      'pause disabled bitmap
      If ex Then ~iList["pauseDisabled"]
      iList["pauseDisabled"] = New wxEmptyBitmap(rects["pause"].GetWidth(), rects["pause"].GetHeight(), 32)
      iList["pauseDisabled"].UseAlpha()
      dc.SelectObject( iList["pauseDisabled"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(disabledPen)
      gdc.SetBrush(wxNullBrush)
    End Select

    gdc.DrawRectangle(Round(3 * ps), Round(5 * ps), Round(3 * ps), round(8 * ps))
    gdc.DrawRectangle(Round(9 * ps), Round(5 * ps), round(3 * ps), round(8 * ps))
    gdc.Flush()
  Next

  'stop bitmap
  For i = 1 To 3
    Select Case i
    Case 1
      'stop bitmap
      If ex Then ~iList["stop"]
      iList["stop"] = New wxEmptyBitmap(rects["stop"].GetWidth(), rects["stop"].GetHeight(), 32)
      iList["stop"].UseAlpha()
      dc.SelectObject(iList["stop"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(pen)
      gdc.SetBrush(wxNullBrush)

    Case 2
      'stop hover bitmap
      If ex Then ~iList["stopHover"]
      iList["stopHover"] = New wxEmptyBitmap(rects["stop"].GetWidth(), rects["stop"].GetHeight(), 32)
      iList["stopHover"].UseAlpha()
      dc.SelectObject(iList["stopHover"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(pen)
      gdc.SetBrush(brush)

    Case 3
      'stop disabled bitmap
      If ex Then ~iList["stopDisabled"]
      iList["stopDisabled"] = New wxEmptyBitmap(rects["stop"].GetWidth(), rects["stop"].GetHeight(), 32)
      iList["stopDisabled"].UseAlpha()
      dc.SelectObject(iList["stopDisabled"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(disabledPen)
      gdc.SetBrush(wxNullBrush)
    End Select
    gdc.DrawRectangle(Round(5 * ps), Round(5 * ps), round(8 * ps), round(8 * ps))
  Next

  'prev bitmap
  For i = 1 To 3
    Select Case i
    Case 1
      If ex Then ~iList["prev"]
      iList["prev"]  = New wxEmptyBitmap(rects["prev"].GetWidth(), rects["prev"].GetHeight(), 32)
      iList["prev"].UseAlpha()
      dc.SelectObject(iList["prev"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(pen)
      gdc.SetBrush(wxNullBrush)

    Case 2
      'prev hover bitmap
      If ex Then ~iList["prevHover"]
      iList["prevHover"] = New wxEmptyBitmap(rects["prev"].GetWidth(), rects["prev"].GetHeight(), 32)
      iList["prevHover"].UseAlpha()
      dc.SelectObject(iList["prevHover"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(pen)
      gdc.SetBrush(brush)

    Case 3
      'prev disabled bitmap
      If ex Then ~iList["prevDisabled"] 
      iList["prevDisabled"]  = New wxEmptyBitmap(rects["prev"].GetWidth(), rects["prev"].GetHeight(), 32)
      iList["prevDisabled"].UseAlpha()
      dc.SelectObject(iList["prevDisabled"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(disabledPen)
      gdc.SetBrush(wxNullBrush)
    End Select

    path = gdc.CreatePath()
    path.MoveToPoint(5 * ps, 5 * ps)
    path.AddLineToPoint(5 * ps, 13 * ps)
    path.MoveToPoint(7 * ps, 9 * ps)
    path.AddLineToPoint(14 * ps, 5 * ps)
    path.AddLineToPoint(14 * ps, 13 * ps)
    path.AddLineToPoint(7 * ps, 9 * ps)
    gdc.DrawPath(path)
  Next

  'next bitmap
  For i = 1 To 3
    Select Case i
    Case 1
      If ex Then ~iList["next"]
      iList["next"] = New wxEmptyBitmap(rects["next"].GetWidth(), rects["next"].GetHeight(), 32)
      iList["next"].UseAlpha()
      dc.SelectObject(iList["next"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(pen)
      gdc.SetBrush(wxNullBrush)

    Case 2
      'prev hover bitmap
      If ex Then ~iList["nextHover"]
      iList["nextHover"] = New wxEmptyBitmap(rects["next"].GetWidth(), rects["next"].GetHeight(), 32)
      iList["nextHover"].UseAlpha()
      dc.SelectObject(iList["nextHover"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(pen)
      gdc.SetBrush(brush)

    Case 3
      'prev disabled bitmap
      If ex Then ~iList["nextDisabled"]
      iList["nextDisabled"] = New wxEmptyBitmap(rects["next"].GetWidth(), rects["next"].GetHeight(), 32)
      iList["nextDisabled"].UseAlpha()
      dc.SelectObject(iList["nextDisabled"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      gdc.SetPen(disabledPen)
      gdc.SetBrush(wxNullBrush)
    End Select

    path = gdc.CreatePath()
    path.MoveToPoint(5 * ps, 5 * ps)
    path.AddLineToPoint(5 * ps, 13 * ps)
    path.AddLineToPoint(11 * ps, 9 * ps)
    path.AddLineToPoint(5 * ps, 5 * ps)
    path.MoveToPoint(13 * ps, 5 * ps)
    path.AddLineToPoint(13 * ps, 13 * ps)
    gdc.DrawPath(path)
  Next

  'volume bitmap
  If ex Then ~iList["vol"] 
  iList["vol"] = New wxEmptyBitmap(rects["mute"].GetWidth(), rects["mute"].GetHeight(), 32)
  iList["vol"].UseAlpha()
  dc.SelectObject(iList["vol"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  gdc.SetPen(pen)
  gdc.SetBrush(wxNullBrush)
  path = gdc.CreatePath()
  path.MoveToPoint(1 * ps, 7 * ps)
  path.AddLineToPoint(4 * ps, 7 * ps)
  path.AddLineToPoint(10 * ps, 3 * ps)
  path.AddLineToPoint(10 * ps, 15 * ps)
  path.AddLineToPoint(4 * ps, 11 * ps)
  path.AddLineToPoint(1 * ps, 11 * ps)
  path.AddLineToPoint(1 * ps, 7 * ps)
  gdc.DrawPath(path)

  'volume hover bitmap
  If ex Then ~iList["volHover"] 
  iList["volHover"] = New wxEmptyBitmap(rects["mute"].GetWidth(), rects["mute"].GetHeight(), 32)
  iList["volHover"].UseAlpha()
  dc.SelectObject(iList["volHover"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  gdc.SetPen(pen)
  gdc.SetBrush(brush)
  path = gdc.CreatePath()
  path.MoveToPoint(1 * ps, 7 * ps)
  path.AddLineToPoint(4 * ps, 7 * ps)
  path.AddLineToPoint(10 * ps, 3 * ps)
  path.AddLineToPoint(10 * ps, 15 * ps)
  path.AddLineToPoint(4 * ps, 11 * ps)
  path.AddLineToPoint(1 * ps, 11 * ps)
  path.AddLineToPoint(1 * ps, 7 * ps)
  gdc.DrawPath(path)

  'mute bitmap
  If ex Then ~iList["mute"]
  iList["mute"] = New wxEmptyBitmap(rects["mute"].GetWidth(), rects["mute"].GetHeight(), 32)
  iList["mute"].UseAlpha()
  dc.SelectObject(iList["mute"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  gdc.SetPen(pen)
  gdc.SetBrush(brush)
  path = gdc.CreatePath()
  path.MoveToPoint(1 * ps, 7 * ps)
  path.AddLineToPoint(4 * ps, 7 * ps)
  path.AddLineToPoint(10 * ps, 3 * ps)
  path.AddLineToPoint(10 * ps, 15 * ps)
  path.AddLineToPoint(4 * ps, 11 * ps)
  path.AddLineToPoint(1 * ps, 11 * ps)
  path.AddLineToPoint(1 * ps, 7 * ps)
  path.MoveToPoint(13 * ps, 7 * ps)
  path.AddLineToPoint(18 * ps, 12 * ps)
  path.MoveToPoint(18 * ps, 7 * ps)
  path.AddLineToPoint(13 * ps, 12 * ps)
  gdc.DrawPath(path)

  'record bitmap
  If ex Then ~iList["rec"]
  iList["rec"] = New wxEmptyBitmap(rects["rec"].GetWidth(), rects["rec"].GetHeight(), 32)
  iList["rec"].UseAlpha()
  dc.SelectObject(iList["rec"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  gdc.SetPen(wxTRANSPARENT_PEN)
  Dim brush2 = gdc.CreateRadialGradientBrush(8 * ps, 8 * ps, 8 * ps, 8 * ps, 11 * ps, wxColor(255, 235, 235), wxRED)
  gdc.SetBrush2(brush2)
  gdc.DrawEllipse(2 * ps, 2 * ps, 13 * ps, 13 * ps)

  'rec hover bitmap
  If ex Then ~iList["recHover"] 
  iList["recHover"] = New wxEmptyBitmap(rects["rec"].GetWidth(), rects["rec"].GetHeight(), 32)
  iList["recHover"].UseAlpha()
  dc.SelectObject(iList["recHover"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  gdc.SetBrush(wxTRANSPARENT_BRUSH)
  brush2 = gdc.CreateRadialGradientBrush(8 * ps, 8 * ps, 8 * ps, 8 * ps, 11 * ps, wxColor(255, 150, 150), wxRED)
  gdc.SetBrush2(brush2)
  gdc.DrawEllipse(2 * ps, 2 * ps, 13 * ps, 13 * ps)

  'volume slider bitmap
  If ex Then ~iList["vSlider"]
  iList["vSlider"] = New wxEmptyBitmap(rects["vSlider"].GetWidth(), rects["vSlider"].GetHeight(), 32)
  iList["vSlider"].UseAlpha()
  dc.SelectObject(iList["vSlider"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  brush2 = gdc.CreateLinearGradientBrush(0, 3, rects["vSlider"].GetWidth(), 7, wxColor(200, 200, 255), col)
  gdc.SetBrush2(brush2)
  gdc.DrawRectangle(0, 3 * ps, rects["vSlider"].GetWidth(), 4 * ps)

  'volume position bitmap
  If ex Then ~iList["pos"]
  iList["pos"] = New wxEmptyBitmap(rects["vPos"].GetWidth(), rects["vPos"].GetHeight(), 32)
  iList["pos"].UseAlpha()
  dc.SelectObject(iList["pos"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
'  brush2 = gdc.CreateRadialGradientBrush(6 * ps, 6 * ps, 6 * ps, 6 * ps, 6 * ps, wxBLACK, wxLIGHT_GREY)
  brush2 = gdc.CreateRadialGradientBrush(6 * ps, 6 * ps, 6 * ps, 6 * ps, 6 * ps, wxWHITE, musicBackColour)
  gdc.SetBrush2(brush2)
  gdc.DrawEllipse(1 / Scale, 1 / Scale, Fix(10 * ps), Fix(10 * ps))

  'title position slider bitmap
  If ex Then ~iList["mSlider"]
  iList["mSlider"] = New wxEmptyBitmap(rects["mSlider"].GetWidth(), rects["mSlider"].GetHeight(), 32)
  iList["mSlider"].UseAlpha()
  dc.SelectObject(iList["mSlider"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  brush2 = gdc.CreateLinearGradientBrush(0, 3 * ps, rects["mSlider"].GetWidth(), 7 * ps, wxColor(200, 200, 255), col)
  gdc.SetBrush2(brush2)
  gdc.DrawRectangle(0, 3 * ps, rects["mSlider"].GetWidth(), 4 * ps)

'--------------------------------------------------------------------------------------------
'radio and tv bitmaps 

  'create radio bitmap
  If ex Then 
    ~iList["radio"]
    ~iList["radio_T"]
  End If

  iList["radio"] = New wxEmptyBitmap(stationIconSize, stationIconSize, 32)
  iList["radio_T"] = New wxEmptyBitmap(stationIconSize, stationIconSize, 32)
  iList["radio_T"].UseAlpha()

  For i = 1 To 2
    if i = 1 then
      dc.SelectObject(iList["radio"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)

      'draw a white rectangle
      gdc.SetBrush(wxWHITE_BRUSH)
      gdc.SetPen(wxTRANSPARENT_PEN)
      gdc.DrawRectangle(0, 0, stationIconSize, stationIconSize)
      pen.SetColour(wxBLACK)
      brush2 = gdc.CreateLinearGradientBrush(0, 0, 20 * ps, 20 * ps, wxColor(80, 80, 80), wxLIGHT_GREY)

    Else

      dc.SelectObject(iList["radio_T"])
      dc.SetBackground(wxTRANSPARENT_BRUSH)
      dc.Clear()
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      pen.SetColour(wxColor(100, 100, 100))
      brush2 = gdc.CreateLinearGradientBrush(0, 0, 20 * ps, 20 * ps, wxColor(80, 80, 80), wxWHITE)
    End If
    
    gdc.SetPen(pen)
    gdc.SetBrush2(brush2)
    gdc.DrawRoundedRectangle(2 * ps, 7 * ps, 20 * ps, 15 * ps, 3 * ps)
    path = gdc.CreatePath()
    path.AddCircle(9 * ps, 14 * ps, 3.5 * ps)
    path.MoveToPoint(4 * ps, 7 * ps)
    path.AddLineToPoint(20 * ps, 2 * ps)
    path.AddCircle(17 * ps, 12 * ps, .5 * ps)
    path.AddCircle(17 * ps, 17 * ps, .5 * ps)
    gdc.DrawPath(path)
  Next

  'create tv bitmap
  If ex Then
    ~iList["tv"]
    ~iList["tv_T"]
  End If

  iList["tv"] = New wxEmptyBitmap(stationIconSize, stationIconSize, 32)
  iList["tv_T"] = New wxEmptyBitmap(stationIconSize, stationIconSize, 32)
  iList["tv_T"].UseAlpha()

  For i = 1 To 2
    If i = 1 Then
      dc.SelectObject(iList["tv"])
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)

      'draw a white rectangle
      gdc.SetBrush(wxWHITE_BRUSH)
      gdc.SetPen(wxTRANSPARENT_PEN)
      gdc.DrawRectangle(0, 0, stationIconSize, stationIconSize)

      pen.SetColour(wxBLACK)
      brush2 = gdc.CreateLinearGradientBrush(0, 0, 20, 20, wxColor(80, 80, 80), wxLIGHT_GREY)

    Else
      dc.SelectObject(iList["tv_T"])
      dc.SetBackground(wxTRANSPARENT_BRUSH)
      dc.Clear()
      gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
      pen.SetColour(wxColor(100, 100, 100))
      brush2 = gdc.CreateLinearGradientBrush(0, 0, 20 * ps, 20 * ps, wxColor(80, 80, 80), wxWHITE)
    End If

    gdc.SetPen(pen)
    gdc.SetBrush(wxTRANSPARENT_BRUSH)
    gdc.DrawRoundedRectangle(2 * ps, 4 * ps, 20 * ps, 17 * ps, 2 * ps)
    pen.SetWidth(1)
    gdc.SetPen(pen)

    brush2 = gdc.CreateLinearGradientBrush(0, 0, 20 * ps, 20 * ps, wxColor(80, 80, 80), wxWHITE)
    gdc.SetBrush2(brush2)
    gdc.DrawRoundedRectangle(4 * ps, 6 * ps, 15 * ps, 12 * ps, 1 * ps)
  Next
  
'--------------------------------------------------------------------------------------------
'taskbar icon

  'create taskbar icon in
  Dim buf As wxBitmap = wxEmptyBitmap(32, 32, 32)
  buf.UseAlpha()
  dc.SelectObject(buf)

  gdc  = wxGraphicsContext_CreateFromMemoryDC(dc)
  dc.SetBrush(wxTRANSPARENT_BRUSH)
  dc.Clear()
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  brush2 = gdc.CreateLinearGradientBrush(0, 0, 32, 32, wxColor(30, 30, 30), wxColor(200, 200, 200))
  gdc.SetBrush2(brush2)
  gdc.DrawRoundedRectangle(5, 1, 20, 28, 3)
  gdc.SetBrush(wxTRANSPARENT_BRUSH)
  pen.SetColor(wxColor(50, 50, 50))
  pen.SetWidth(2)
  gdc.SetPen(pen)
  gdc.DrawRoundedRectangle(5, 1, 20, 28, 3)

  pen.SetColor(wxLIGHT_GREY)
  gdc.SetPen(pen)
  gdc.DrawEllipse(8, 3, 1, 1)
  gdc.DrawEllipse(21, 3, 1, 1)
  gdc.DrawEllipse(8, 25, 1, 1)
  gdc.DrawEllipse(21, 25, 1, 1)

  brush2 = gdc.CreateRadialGradientBrush(15, 18.5, 15, 18.5, 5, wxColor(40, 40, 40), wxColor(120, 120, 120))
  gdc.SetBrush2(brush2)
  pen.SetWidth(1)
  gdc.SetPen(pen)
  gdc.DrawEllipse(9.5, 13.5, 10, 10)

  brush2 = gdc.CreateRadialGradientBrush(14.5, 8, 14.5, 8, 3, wxColor(40, 40, 40), wxColor(120, 120, 120))
  gdc.SetBrush2(brush2)
  gdc.DrawEllipse(11.5, 5, 6, 6)

  iList["taskbarIcon"] = wxIconEmpty()
  iList["taskbarIcon"].CopyFromBitmap(buf)

'--------------------------------------------------------------------------------------------
'normalize dialog

  'create add all files bitmap from normalize
  Dim addNormBmp = wxArtProvider_GetBitmap(wxART_PLUS, wxART_OTHER, wxSize(24, 24))
  iList["addAllNorm"] = New wxEmptyBitmap(36, 36, 32)
  iList["addAllNorm"].UseAlpha()
  'draw the add files bitmap
  dc.SelectObject(iList["addAllNorm"])
  dc.SetBackground(wxTRANSPARENT_BRUSH)
  dc.Clear()
  dc.DrawBitmap(addNormBmp, 0, 0, TRUE)
  dc.DrawBitmap(addNormBmp, 13, 9, TRUE)

'--------------------------------------------------------------------------------------------
'convert dialog

  'create the convert and convert hover bitmaps
  iList["convert"] = New wxEmptyBitmap(196, 196, 32)
  iList["convert"].UseAlpha()
  iList["convertHover"] = New wxEmptyBitmap(196, 196, 32)

  'draw the convert bitmap
  dc.SelectObject(iList["convert"])
  dc.SetBackground(wxTRANSPARENT_BRUSH)
  dc.Clear()

  dc.SelectObject(iList["convert"])
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)

  'draw rectangles
  pen.SetColour(wxBLACK)
  pen.SetWidth(1)
  gdc.SetPen(pen)
  brush.SetColor(wxColour(153, 153, 153))
  brush.SetStyle(wxSOLID)
  gdc.SetBrush(brush)
  gdc.DrawRoundedRectangle(75, 68, 60, 50, 4)

  brush.SetColour(wxColour(212, 212, 212))
  gdc.SetBrush(brush)
  gdc.DrawRoundedRectangle(60, 78, 60, 50, 4)

  'draw a note
  gdc.SetBrush(wxBLACK_BRUSH)
  gdc.DrawEllipse(75, 108, 14, 9)
  pen.SetWidth(4)
  gdc.SetPen(pen)

  path = gdc.CreatePath()
  path.MoveToPoint(89.5, 112)
  path.AddLineToPoint(89.5, 90)
  path.AddCurveToPoint(93, 93, 96, 96, 95, 100)
  gdc.StrokePath(path)
  
  'draw the arrow
  gdc.SetPen(wxBLACK_PEN)
  gdc.SetBrush(wxBrush(wxColour(255, 193, 193), wxSOLID))

  path = gdc.CreatePath()
  path.MoveToPoint(145, 80)
  path.AddLineToPoint(102, 110)
  path.AddLineToPoint(140, 100)
  path.AddLineToPoint(134, 96)
  path.CloseSubpath()
  path.MoveToPoint(135, 90)
  gdc.DrawPath(path)

  gdc.SetPen(wxNullPen)
  gdc.SetBrush(wxNullBrush)

  'create the red hover bitmap
  dc.SelectObject(iList["convertHover"])
  dc.SetBackground(wxRED_BRUSH)
  dc.Clear()
  
  'copy the bitmap to the hover bitmap
  gdc = wxGraphicsContext_CreateFromMemoryDC(dc)
  gdc.DrawBitmap(iList["convert"], 0, 0, 196, 196)

'--------------------------------------------------------------------------------------------
'clear memorydc

  dc.SelectObject(wxNullBitmap)
  dc.SetFont(wxNullFont)
  dc.SetBrush(wxNullBrush)
  dc.SetPen(wxNullPen)
End Sub

