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

Method OnDragEnter

Source/FrameEditor.cpp:1286–1316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1284}
1285
1286DROPEFFECT CFrameEditorDropTarget::OnDragEnter(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point)
1287{
1288 CFrameWnd *pMainFrame = FTEnv.GetMainFrame(); // // //
1289
1290 if (pDataObject->IsDataAvailable(m_iClipboard)) {
1291 if (dwKeyState & MK_CONTROL) {
1292 if (m_pParent->IsCopyValid(pDataObject)) {
1293 m_nDropEffect = DROPEFFECT_COPY;
1294 m_bCopyNewPatterns = true;
1295 if (pMainFrame != NULL)
1296 pMainFrame->SetMessageText(IDS_FRAME_DROP_COPY_NEW);
1297 }
1298 }
1299 else if (dwKeyState & MK_SHIFT) {
1300 if (m_pParent->IsCopyValid(pDataObject)) {
1301 m_nDropEffect = DROPEFFECT_COPY;
1302 m_bCopyNewPatterns = false;
1303 if (pMainFrame != NULL)
1304 pMainFrame->SetMessageText(IDS_FRAME_DROP_COPY);
1305 }
1306 }
1307 else {
1308 m_nDropEffect = DROPEFFECT_MOVE;
1309 if (pMainFrame != NULL)
1310 pMainFrame->SetMessageText(IDS_FRAME_DROP_MOVE);
1311 }
1312 m_pParent->UpdateDrag(point);
1313 }
1314
1315 return m_nDropEffect;
1316}
1317
1318DROPEFFECT CFrameEditorDropTarget::OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point)
1319{

Callers

nothing calls this directly

Calls 3

IsCopyValidMethod · 0.80
GetMainFrameMethod · 0.45
UpdateDragMethod · 0.45

Tested by

no test coverage detected