| 376 | #pragma mark - IProgressBarControl |
| 377 | |
| 378 | STDMETHODIMP CProgressBarControl::get_Value(SHORT *pValue) { |
| 379 | if (pValue == NULL) { |
| 380 | return E_POINTER; |
| 381 | } |
| 382 | |
| 383 | if (m_innerHwnd == NULL) { |
| 384 | *pValue = 0; |
| 385 | return S_OK; |
| 386 | } |
| 387 | |
| 388 | if (GetWindowLongPtr(m_innerHwnd, GWL_STYLE) & PBS_MARQUEE) { |
| 389 | // Marquee - no value |
| 390 | *pValue = -1; |
| 391 | } else { |
| 392 | // Normal - return PBM_GETPOS |
| 393 | *pValue = (SHORT)SendMessage(m_innerHwnd, PBM_GETPOS, 0, 0); |
| 394 | } |
| 395 | |
| 396 | return S_OK; |
| 397 | } |
| 398 | |
| 399 | STDMETHODIMP CProgressBarControl::put_Value(SHORT value) { |
| 400 | if (m_innerHwnd == NULL) { |
nothing calls this directly
no outgoing calls
no test coverage detected