[API]
GetClientRect
GetDC
SelectObject
ReleaseDC
RECT

[INCLUDE]
DrawProgressBarEx
SendMessage

[CODE]
Public Sub DrawProgressBar(ByVal hwnd As Long, ByVal Progress As Single, ByVal xText As String)
  Dim hDC As Long
  Dim hFont As Long
  Dim hFontOld As Long
  Dim xType1 As RECT

  hDC = GetDC(hWnd)
  If Not hDC = 0& Then
    If Not GetClientRect(hWnd, xType1) = 0& Then
      hFont = SendMessage(hWnd, &H31&, 0&, 0&)
      If Not hFont = 0& Then
        hFontOld = SelectObject(hDC, hFont)
        End If
      Call DrawProgressBarEx(hDC, xType1, Progress, xText)
      If Not hFontOld = 0& Then
        Call SelectObject(hDC, hFontOld)
        End If
      End If
    Call ReleaseDC(hWnd, hDC)
    End If
  End Sub
