📄 dropview.h
字号:
#if !defined(AFX_DROPVIEW_H__CD1ED6E1_4E79_11D9_82B8_CD826FA87B44__INCLUDED_)
#define AFX_DROPVIEW_H__CD1ED6E1_4E79_11D9_82B8_CD826FA87B44__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DropView.h : header file
//作者:孟庆远
/////////////////////////////////////////////////////////////////////////////
// CDropView view
#define ID_DROPVIEW 109
#define WM_DROPVIEW WM_USER+106
#define WM_DROPWINPOS WM_USER+107
#define WM_BTOOLEXTENTCX WM_USER+130
struct BTOOLTEXT
{
int iItem; //Number of Text
CString strText; //Show Text
};
typedef struct tagDROP_POS{
long x; //Mouse x long
long y; //Mouse y long
}DROP_POS;
typedef struct tagDROP_URL{
CString strLocatinUrl; //Url
CString strComment; //Comment
CString strPathName; //Path Name
CString strFileName; //File Name
CString strFilePath;
CString strRegPath;
int nBreakRev; //1 yes or 0 no
int nParentNum;
BOOL bRename; //auto rename file
CWnd* pMainWnd; //Main Frame Win
}DROP_URL;
class CDropView : public CView
{
public:
CDropView(); // protected constructor used by dynamic creation
//DECLARE_DYNCREATE(CDropView)
// Attributes
public:
COleDropTarget m_dropTarget;
HGLOBAL hObj;
CWnd *m_pFrameWnd;
CPoint m_TempPoint;
UINT m_nIDMenu;
int m_nThreadNum; //App ThreadNum <=0 KillIimer
CToolTipCtrl m_ToolTip;
BOOL m_bIsLButtonUp;
BOOL m_bIsTipShow;
protected:
CString m_Url; //Url
CString m_Comment; //Url Comment
DROP_POS dropPos;
BOOL m_bMove;
BOOL m_bAddJob; //Call CDownAddJob
CRect m_RectText;
int m_nAnimate;
// Operations
public:
BOOL CreateView(LPCTSTR szClassName,CRect rect,CWnd* pParentWnd,UINT nID,DWORD dwStyle=WS_VISIBLE);
CString GetUrl() {return m_Url;}
CString GetComment() {return m_Comment;}
BOOL PopupDropMenu();
void SetWndID(CWnd *pWnd,UINT nID);
void SetTimerStart(int iThreadNum);
void KillTimerEnd(int iThreadNum);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDropView)
public:
virtual DROPEFFECT OnDragEnter(COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
virtual DROPEFFECT OnDragOver(COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
virtual BOOL OnDrop(COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point);
virtual void OnInitialUpdate();
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CDropView();
//#ifdef _DEBUG
// virtual void AssertValid() const;
// virtual void Dump(CDumpContext& dc) const;
//#endif
// Generated message map functions
protected:
//{{AFX_MSG(CDropView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnDestroy();
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnPaint();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DROPVIEW_H__CD1ED6E1_4E79_11D9_82B8_CD826FA87B44__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -