MCPcopy Create free account
hub / github.com/LegacyUpdate/LegacyUpdate / put_Value

Method put_Value

LegacyUpdate/ProgressBarControl.cpp:399–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399STDMETHODIMP CProgressBarControl::put_Value(SHORT value) {
400 if (m_innerHwnd == NULL) {
401 return E_FAIL;
402 }
403
404 ULONG_PTR cookie;
405 IsolationAwareStart(&cookie);
406
407 if (value == -1) {
408 // Marquee style
409 SetWindowLongPtr(m_innerHwnd, GWL_STYLE, GetWindowLongPtr(m_innerHwnd, GWL_STYLE) | PBS_MARQUEE);
410 SendMessage(m_innerHwnd, PBM_SETMARQUEE, TRUE, 100);
411 } else {
412 // Normal style
413 SHORT oldValue = -1;
414 get_Value(&oldValue);
415 if (oldValue == -1) {
416 SendMessage(m_innerHwnd, PBM_SETMARQUEE, FALSE, 0);
417 SetWindowLongPtr(m_innerHwnd, GWL_STYLE, GetWindowLongPtr(m_innerHwnd, GWL_STYLE) & ~PBS_MARQUEE);
418 SendMessage(m_innerHwnd, PBM_SETRANGE, 0, MAKELPARAM(0, 100));
419 }
420
421 SendMessage(m_innerHwnd, PBM_SETPOS, value, 0);
422 }
423
424 IsolationAwareEnd(&cookie);
425 InvalidateContainer();
426
427 return S_OK;
428}

Callers

nothing calls this directly

Calls 2

IsolationAwareStartFunction · 0.85
IsolationAwareEndFunction · 0.85

Tested by

no test coverage detected