MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / OnMouseMove

Method OnMouseMove

Source/SampleEditorView.cpp:191–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191void CSampleEditorView::OnMouseMove(UINT nFlags, CPoint point)
192{
193 double Sample = double(point.x) * m_dSampleStep;
194 int Offset = int(Sample / (8.0 * 64.0));
195 int Pos = int(Sample / 8.0); // // //
196
197 if (!m_iSize)
198 return;
199
200 if (point.y > m_clientRect.bottom)
201 return;
202
203 if (nFlags & MK_LBUTTON && m_iSelStart != -1) {
204 int Block = GetBlock(point.x + (m_iBlockSize / 2) + int(m_iViewStart / m_dSampleStep));
205 m_iSelEnd = Block;
206 Invalidate();
207 RedrawWindow();
208 static_cast<CSampleEditorDlg*>(GetParent())->SelectionChanged();
209 }
210
211 static_cast<CSampleEditorDlg *>(GetParent())->UpdateStatus(0, AfxFormattedW(
212 ID_INDICATOR_DPCM_SEGMENT, FormattedW(L"0x%02X", Offset), FormattedW(L"%d", Pos))); // // //
213
214 CStatic::OnMouseMove(nFlags, point);
215}
216
217void CSampleEditorView::OnLButtonDown(UINT nFlags, CPoint point)
218{

Callers

nothing calls this directly

Calls 4

AfxFormattedWFunction · 0.85
FormattedWFunction · 0.85
SelectionChangedMethod · 0.80
UpdateStatusMethod · 0.80

Tested by

no test coverage detected