myDataSource* pItemDragDrop=new myDataSource;
pItemDragDrop->str="This string will dragdrop to another place";
pItemDragDrop->DelayRenderFileData(CF_TEXT,NULL);
例如:
int DragEffect=pItemTracking->DoDragDrop(......);
switch(DragEffect)
{
case DROPEFFECT_MOVE:
delete pItemTracking;
GetDocument()->UpdateAllItems(NULL);
GetDocument()->UpdateAllViews(NULL);
break;
case DROPEFFECT_COPY:
case DROPEFFECT_NONE:
default:
break;
BOOL MoveWindow(
HWND hWnd, // handle to window
int X, // horizontal position
int Y, // vertical position
int nWidth, // width
int nHeight, // height
BOOL bRepaint // repaint flag
);
BOOL SetWindowPos( const CWnd* pWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags );
也可以用MoveWindow
BOOL MoveWindow(
HWND hWnd, // handle to window
int X, // horizontal position
int Y, // vertical position
int nWidth, // width
int nHeight, // height
BOOL bRepaint // repaint flag
);