MCPcopy Create free account
hub / github.com/bbbradsmith/nsfplay / OnCopy

Method OnCopy

nsfplug_ui/NSFTrackDialog.cpp:709–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707}
708
709void NSFTrackDialog::OnCopy()
710{
711 CString str;
712
713 if ( m_trk_selected < 0 || NSFPlayer::NES_TRACK_MAX <= m_trk_selected) return;
714
715 str = m_tonestr[m_trk_selected] + "\r\n";
716
717 if( !::OpenClipboard(NULL) )
718 {
719 MessageBox("Error to open the clipboard!");
720 return;
721 }
722
723 HGLOBAL hMem = ::GlobalAlloc(GMEM_FIXED, str.GetLength()+1);
724 LPTSTR pMem = (LPTSTR)hMem;
725 ::lstrcpy(pMem, (LPCTSTR)str);
726
727 ::EmptyClipboard();
728 ::SetClipboardData(CF_TEXT, hMem);
729 ::CloseClipboard();
730}
731
732void NSFTrackDialog::OnSettings()
733{

Callers

nothing calls this directly

Calls 1

GetLengthMethod · 0.45

Tested by

no test coverage detected