MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / CommitValue

Method CommitValue

WinArk/HexControl.cpp:299–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299void CHexControl::CommitValue(int64_t offset, uint64_t value) {
300 if (offset > m_EndOffset) {
301 m_EndOffset = offset;
302 RecalcLayout();
303 }
304
305 if (m_CaretOffset == m_Buffer->GetSize()) {
306 m_Buffer->Increase(m_DataSize);
307 m_NotifyData.hdr.code = HCN_SIZECHANGED;
308 SendNotify(&m_NotifyData);
309 }
310
311 DWORD64 oldValue;
312 m_Buffer->GetData(offset, (uint8_t*)&oldValue, m_DataSize);
313 m_Buffer->SetData(offset, (const uint8_t*)&value, m_DataSize);
314
315 ResetInput();
316 if (m_CaretOffset > m_EndOffset - m_BytesPerLine * 2)
317 SendMessage(WM_VSCROLL, SB_LINEDOWN);
318}
319
320LRESULT CHexControl::OnCreate(UINT, WPARAM, LPARAM, BOOL&) {
321 InitFontMetrics();

Callers

nothing calls this directly

Calls 4

SetDataMethod · 0.80
GetSizeMethod · 0.45
IncreaseMethod · 0.45
GetDataMethod · 0.45

Tested by

no test coverage detected