| 49 | } |
| 50 | |
| 51 | void CAGVideoTestWnd::OnPaint() |
| 52 | { |
| 53 | // TODO: add message handle code here |
| 54 | CPaintDC dc(this); |
| 55 | |
| 56 | CRect rcClient; |
| 57 | |
| 58 | GetClientRect(&rcClient); |
| 59 | dc.FillSolidRect(0, 0, rcClient.Width(), rcClient.Height(), m_crBackColor); |
| 60 | |
| 61 | dc.FillSolidRect(0, 0, m_nVolbarWidth, rcClient.Height(), m_crVolbarBackColor); |
| 62 | dc.FillSolidRect(rcClient.Width() - m_nVolbarWidth, 0, m_nVolbarWidth, rcClient.Height(), m_crVolbarBackColor); |
| 63 | |
| 64 | int nMarkCount = rcClient.Height() / 5; |
| 65 | int nTopPoint = m_nCurVol*nMarkCount / m_nVolRange; |
| 66 | |
| 67 | for (int nIndex = 0; nIndex < nMarkCount; nIndex++) { |
| 68 | if (nIndex <= nTopPoint) { |
| 69 | dc.FillSolidRect(0, rcClient.bottom - 5 * nIndex - 3, m_nVolbarWidth, 3, m_crVolbarBusyColor); |
| 70 | dc.FillSolidRect(rcClient.Width() - m_nVolbarWidth, rcClient.bottom - 5 * nIndex - 3, m_nVolbarWidth, 3, m_crVolbarBusyColor); |
| 71 | } |
| 72 | else { |
| 73 | dc.FillSolidRect(0, rcClient.bottom - 5 * nIndex - 3, m_nVolbarWidth, 3, m_crVolbarFreeColor); |
| 74 | dc.FillSolidRect(rcClient.Width() - m_nVolbarWidth, rcClient.bottom - 5 * nIndex - 3, m_nVolbarWidth, 3, m_crVolbarFreeColor); |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | |
| 80 | void CAGVideoTestWnd::SetVolRange(int nRange) |
nothing calls this directly
no outgoing calls
no test coverage detected