1 Clipboard assistant 2 Clipboard Assistant 3 Clipboard Assistant 4 This component inserts custom handlers for managing the Copy, Cut and Paste menu items under the Edit menu. 5 Select a view class. 6 Enter a string with which to register a custom clipboard format. 10 The selected class is derived from CEditView, which contains\nbuilt in support for the Copy, Cut, and Paste menu items.\n\nDo you wish to continue and override this built in support? 11 The selected class is derived from CRichEditView, which contains\nbuilt in support for the Copy, Cut, and Paste menu items.\n\nDo you wish to continue and override this built in support? 12 This component has already been applied to this project, and cannot be applied a second time! 13 The clipboard assistant could find no classes derived from CView in this project. At least one class derived from CView is required to insert this component into this project. 14 Could not add afxpriv.h to project include file.\nYou will need to add a #include directive for afxpriv.h by hand. 15 Could not find the constructor for the specified view class.\nYou will need to add the code to initialize m_nClipboardFormat by hand. 16 Component insertion cancelled at user's request. 17 The Clipboard Assistant was not able to insert the specified support for clipboard operations. The Clipboard Assistant will not overwrite existing functions. It is very likely that one of the functions this component was trying to write already exists for the specified class. 18 The Clipboard Assistant has successfully modified your project files, to add clipboard support to the specified CView derived class. 100 BOOL %s::IsEditCtrl(CWnd* pWnd) 101 BOOL %s::IsRichEditCtrl(CWnd* pWnd) 102 int %s::IsRichOrEditCtrl(HWND hWnd) 120 afx_msg void %s::OnUpdateEditCopyCut(CCmdUI* pCmdUI) 121 afx_msg void %s::OnUpdateEditPaste(CCmdUI* pCmdUI) 122 afx_msg void %s::OnUpdateEditUndo(CCmdUI* pCmdUI) 123 afx_msg void %s::OnEditCopy() 124 afx_msg void %s::OnEditCut() 125 afx_msg void %s::OnEditPaste() 126 afx_msg void %s::OnEditUndo() 127 BOOL %s::IsSelected() 128 void %s::DoCutCopyPaste(CArchive &ar, BOOL bCut) 129 UINT %s::m_nClipboardFormat 140 ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateEditCopyCut) 141 ON_UPDATE_COMMAND_UI(ID_EDIT_CUT, OnUpdateEditCopyCut) 142 ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste) 143 ON_UPDATE_COMMAND_UI(ID_EDIT_UNDO, OnUpdateEditUndo) 144 ON_COMMAND(ID_EDIT_COPY, OnEditCopy) 145 ON_COMMAND(ID_EDIT_CUT, OnEditCut) 146 ON_COMMAND(ID_EDIT_PASTE, OnEditPaste) 147 ON_COMMAND(ID_EDIT_UNDO, OnEditUndo) 160 \n ASSERT_VALID(pWnd);\n\n TCHAR lpClassName[32];\n ::GetClassName(pWnd->GetSafeHwnd(), lpClassName, 32);\n\n if (!_tcscmp(lpClassName, _T("Edit")))\n return TRUE;\n\n return FALSE; 161 \n {\n CWnd* pWnd = CWnd::GetFocus();\n\n if (pWnd != NULL)\n {\n if (IsEditCtrl(pWnd))\n {\n int nStart, nEnd;\n 162 ((CEdit*)pWnd)->GetSel(nStart, nEnd);\n pCmdUI->Enable(nStart != nEnd);\n return;\n }\n }\n }\n\n pCmdUI->Enable(FALSE); 163 \n {\n CWnd* pWnd = CWnd::GetFocus();\n\n if (pWnd != NULL)\n {\n if (IsEditCtrl(pWnd))\n {\n 164 pCmdUI->Enable(::IsClipboardFormatAvailable(CF_TEXT));\n return;\n }\n }\n }\n\n pCmdUI->Enable(FALSE); 166 \n {\n CWnd* pWnd = CWnd::GetFocus();\n\n if (pWnd != NULL)\n {\n if (IsEditCtrl(pWnd))\n {\n pCmdUI->Enable(((CEdit*)pWnd)->CanUndo());\n return;\n }\n }\n }\n\n pCmdUI->Enable(FALSE); 168 \n {\n CEdit* pEdit = (CEdit*)CWnd::GetFocus();\n pEdit->Copy();\n } 170 \n {\n CEdit* pEdit = (CEdit*)CWnd::GetFocus();\n pEdit->Cut();\n } 172 \n {\n CEdit* pEdit = (CEdit*)CWnd::GetFocus();\n pEdit->Paste();\n } 174 \n {\n CEdit* pEdit = (CEdit*)CWnd::GetFocus();\n pEdit->Undo();\n } 181 \n ASSERT_VALID(pWnd);\n\n TCHAR lpClassName[32];\n ::GetClassName(pWnd->GetSafeHwnd(), lpClassName, 32);\n\n if (!_tcscmp(lpClassName, _T("RICHEDIT")))\n return TRUE;\n\n return FALSE; 182 \n {\n CWnd* pWnd = CWnd::GetFocus();\n\n if (pWnd != NULL)\n {\n if (IsRichEditCtrl(pWnd))\n {\n int nStart, nEnd;\n ((CEdit*)pWnd)->GetSel(nStart, nEnd);\n 183 pCmdUI->Enable(nStart != nEnd);\n return;\n }\n }\n }\n\n pCmdUI->Enable(FALSE); 184 \n {\n CWnd* pWnd = CWnd::GetFocus();\n\n if (pWnd != NULL)\n {\n if (IsRichEditCtrl(pWnd))\n {\n 185 pCmdUI->Enable(::IsClipboardFormatAvailable(CF_TEXT));\n return;\n }\n }\n }\n\n pCmdUI->Enable(FALSE); 186 \n {\n CWnd* pWnd = CWnd::GetFocus();\n\n if (pWnd != NULL)\n {\n if (IsRichEditCtrl(pWnd))\n {\n 187 pCmdUI->Enable(((CEdit*)pWnd)->CanUndo());\n return;\n }\n }\n }\n\n pCmdUI->Enable(FALSE); 188 \n {\n CRichEditCtrl* pEdit = (CRichEditCtrl*)CWnd::GetFocus();\n pEdit->Copy();\n } 190 \n {\n CRichEditCtrl* pEdit = (CRichEditCtrl*)CWnd::GetFocus();\n pEdit->Cut();\n } 192 \n {\n CRichEditCtrl* pEdit = (CRichEditCtrl*)CWnd::GetFocus();\n pEdit->Paste();\n } 194 \n {\n CRichEditCtrl* pEdit = (CRichEditCtrl*)CWnd::GetFocus();\n pEdit->Undo();\n } 201 \n ASSERT(::IsWindow(hWnd));\n\n TCHAR lpClassName[32];\n ::GetClassName(hWnd,lpClassName, 32);\n\n if (!_tcscmp(lpClassName, _T("Edit")))\n return 1;\n if (!_tcscmp(lpClassName, _T("RICHEDIT")))\n return 2;\n\n return 0; 202 \n {\n HWND hWndFocus = ::GetFocus();\n\n if (hWndFocus != NULL)\n {\n int wndtype = IsRichOrEditCtrl(hWndFocus);\n if (wndtype == 1) // is an edit control\n {\n int nStart,nEnd;\n ::SendMessage(hWndFocus, EM_GETSEL, (WPARAM)&nStart, (LPARAM)&nEnd);\n 203 pCmdUI->Enable(nStart != nEnd);\n return;\n }\n else if (wndtype == 2) // is a richedit control\n {\n CHARRANGE cr;\n ::SendMessage(hWndFocus, EM_EXGETSEL, 0, (LPARAM)&cr);\n pCmdUI->Enable(cr.cpMin != cr.cpMax);\n return;\n }\n }\n }\n\n pCmdUI->Enable(FALSE); 204 \n {\n HWND hWndFocus = ::GetFocus();\n\n if (hWndFocus != NULL)\n {\n if (IsRichOrEditCtrl(hWndFocus))\n {\n 205 pCmdUI->Enable(::IsClipboardFormatAvailable(CF_TEXT));\n return;\n }\n }\n }\n\n pCmdUI->Enable(FALSE); 206 \n {\n HWND hWndFocus = ::GetFocus();\n\n if (hWndFocus != NULL)\n {\n if (IsRichOrEditCtrl(hWndFocus))\n {\n 207 pCmdUI->Enable(::SendMessage(hWndFocus, EM_CANUNDO, 0, 0));\n return;\n }\n }\n }\n\n pCmdUI->Enable(FALSE); 208 \n {\n HWND hWndFocus = ::GetFocus();\n ASSERT(::IsWindow(hWndFocus));\n ::SendMessage(hWndFocus, WM_COPY, 0, 0);\n } 210 \n {\n HWND hWndFocus = ::GetFocus();\n ASSERT(::IsWindow(hWndFocus));\n ::SendMessage(hWndFocus, WM_CUT, 0, 0);\n } 212 \n {\n HWND hWndFocus = ::GetFocus();\n ASSERT(::IsWindow(hWndFocus));\n ::SendMessage(hWndFocus, WM_PASTE, 0, 0);\n } 214 \n {\n HWND hWndFocus = ::GetFocus();\n ASSERT(::IsWindow(hWndFocus));\n ::SendMessage(hWndFocus, EM_UNDO, 0, 0);\n } 220 \n pCmdUI->Enable(IsSelected()); 221 \n pCmdUI->Enable(::IsClipboardFormatAvailable(m_nClipboardFormat)); 223 \n {\n CSharedFile memFile;\n CArchive ar(&memFile, CArchive::store|CArchive::bNoFlushOnDelete);\n\n // serialize data to archive object\n DoCutCopyPaste(ar, FALSE);\n\n ar.Flush(); 224 \n {\n CSharedFile memFile;\n CArchive ar(&memFile, CArchive::store|CArchive::bNoFlushOnDelete);\n\n // serialize data to archive object\n DoCutCopyPaste(ar, TRUE);\n\n ar.Flush();\n\n HGLOBAL hData = memFile.Detach(); 225 \n {\n if (OpenClipboard())\n {\n HANDLE hData = ::GetClipboardData(m_nClipboardFormat);\n if (hData != NULL)\n {\n CSharedFile memFile;\n memFile.SetHandle(hData,FALSE);\n 227 \n\n // TODO: Add/Replace code to selectively enable and disable the copy \n // and cut menu items. Return TRUE when one or more items are 228 \n\n // TODO: Add/Replace code to copy the currently selected data to or\n // from the clipboard, via the CArchive object. Note: \n // ar.IsStoring() set to TRUE indicates a copy or cut operation. 243 \n\n HGLOBAL hData = memFile.Detach();\n if (OpenClipboard())\n {\n ::SetClipboardData(m_nClipboardFormat, hData);\n CloseClipboard();\n }\n else\n AfxMessageBox(CG_IDS_CANNOT_OPEN_CLIPBOARD);\n } 244 \n if (OpenClipboard())\n {\n ::SetClipboardData(m_nClipboardFormat, hData);\n CloseClipboard();\n }\n else\n AfxMessageBox(CG_IDS_CANNOT_OPEN_CLIPBOARD);\n } 245 CArchive ar(&memFile, CArchive::load);\n\n // serialize data to document\n DoCutCopyPaste(ar, FALSE);\n ar.Close();\n memFile.Detach();\n }\n else\n 247 \n // selected, and return FALSE when no items are selected.\n\n return TRUE; 248 \n\n GetDocument()->Serialize(ar);\n\n if (bCut)\n {\n ASSERT(ar.IsStoring()); // no cutting on paste operation\n\n // TODO: Add/Replace code to delete the currently selected items. 265 AfxMessageBox(CG_IDS_CANNOT_GET_CLIPBOARD_DATA);\n CloseClipboard();\n }\n else\n AfxMessageBox(CG_IDS_CANNOT_OPEN_CLIPBOARD);\n }\n 268 \n\n GetDocument()->DeleteContents();\n }\n\n // updated view and flag as modified if cut or paste operation\n 288 if (!(ar.IsStoring() && !bCut))\n {\n GetDocument()->UpdateAllViews(NULL);\n GetDocument()->SetModifiedFlag();\n } 300 Failed to open Clipboard! 301 Failed to get Clipboard data! 350 BOOL %s::IsEditCtrl(CWnd* pWnd); \n afx_msg void %s::OnUpdateEditCopyCut(CCmdUI* pCmdUI); \n afx_msg void %s::OnUpdateEditPaste(CCmdUI* pCmdUI); \n afx_msg void %s::OnUpdateEditUndo(CCmdUI* pCmdUI); \n afx_msg void %s::OnEditCopy(); \n afx_msg void %s::OnEditCut(); \n afx_msg void %s::OnEditPaste(); \n afx_msg void %s::OnEditUndo(); \n 351 BOOL %s::IsRichEditCtrl(CWnd* pWnd); \n afx_msg void %s::OnUpdateEditCopyCut(CCmdUI* pCmdUI); \n afx_msg void %s::OnUpdateEditPaste(CCmdUI* pCmdUI); \n afx_msg void %s::OnUpdateEditUndo(CCmdUI* pCmdUI); \n afx_msg void %s::OnEditCopy(); \n afx_msg void %s::OnEditCut(); \n afx_msg void %s::OnEditPaste(); \n afx_msg void %s::OnEditUndo(); \n 352 UINT %s::m_nClipboardFormat; \n BOOL %s::IsSelected(); \n void %s::DoCutCopyPaste(CArchive &ar, BOOL bCut); \n afx_msg void %s::OnUpdateEditCopyCut(CCmdUI* pCmdUI); \n afx_msg void %s::OnUpdateEditPaste(CCmdUI* pCmdUI); \n afx_msg void %s::OnEditCopy(); \n afx_msg void %s::OnEditCut(); \n afx_msg void %s::OnEditPaste(); \n CG_IDS_CANNOT_OPEN_CLIPBOARD \n CG_IDS_CANNOT_GET_CLIPBOARD_DATA \n 353 int %s::IsRichOrEditCtrl(HWND hWnd); \n afx_msg void %s::OnUpdateEditCopyCut(CCmdUI* pCmdUI); \n afx_msg void %s::OnUpdateEditPaste(CCmdUI* pCmdUI); \n afx_msg void %s::OnUpdateEditUndo(CCmdUI* pCmdUI); \n afx_msg void %s::OnEditCopy(); \n afx_msg void %s::OnEditCut(); \n afx_msg void %s::OnEditPaste(); \n afx_msg void %s::OnEditUndo(); \n 354 Select a CView derived class and at least one check box! 355 Members to be added: \n 57344 Clipboard Assistant 57346 // CG: This block was added by the Clipboard Assistant component 57347 // CG: This function was added by the Clipboard Assistant component 57348 // CG: This line was added by the Clipboard Assistant component 61440 Open 61441 Save As 61442 All Files (*.*) 61443 Untitled 61446 an unnamed file 61457 &Hide 61472 No error message is available. 61473 An unsupported operation was attempted. 61474 A required resource was unavailable. 61475 Out of memory. 61476 An unknown error has occurred. 61696 Invalid filename. 61697 Failed to open document. 61698 Failed to save document. 61699 Save changes to %1? 61700 Failed to create empty document. 61701 The file is too large to open. 61702 Could not start print job. 61703 Failed to launch help. 61704 Internal application error. 61705 Command failed. 61706 Insufficient memory to perform operation. 61707 System registry entries have been removed and the INI file (if any) was deleted. 61708 Not all of the system registry entries (or INI file) were removed. 61709 This program requires the file %s, which was not found on this system. 61710 This program is linked to the missing export %s in the file %s. This machine may have an incompatible version of %s. 61712 Please enter an integer. 61713 Please enter a number. 61714 Please enter an integer between %1 and %2. 61715 Please enter a number between %1 and %2. 61716 Please enter no more than %1 characters. 61717 Please select a button. 61718 Please enter an integer between 0 and 255. 61719 Please enter a positive integer. 61720 Please enter a date and/or time. 61721 Please enter a currency. 61728 Unexpected file format. 61729 %1\nCannot find this file.\nPlease verify that the correct path and file name are given. 61730 Destination disk drive is full. 61731 Unable to read from %1, it is opened by someone else. 61732 Unable to write to %1, it is read-only or opened by someone else. 61733 An unexpected error occurred while reading %1. 61734 An unexpected error occurred while writing %1. 61836 Unable to read write-only property. 61837 Unable to write read-only property. 61840 Unable to load mail system support. 61841 Mail system DLL is invalid. 61842 Send Mail failed to send message. 61856 No error occurred. 61857 An unknown error occurred while accessing %1. 61858 %1 was not found. 61859 %1 contains an invalid path. 61860 %1 could not be opened because there are too many open files. 61861 Access to %1 was denied. 61862 An invalid file handle was associated with %1. 61863 %1 could not be removed because it is the current directory. 61864 %1 could not be created because the directory is full. 61865 Seek failed on %1 61866 A hardware I/O error was reported while accessing %1. 61867 A sharing violation occurred while accessing %1. 61868 A locking violation occurred while accessing %1. 61869 Disk full while accessing %1. 61870 An attempt was made to access %1 past its end. 61872 No error occurred. 61873 An unknown error occurred while accessing %1. 61874 An attempt was made to write to the reading %1. 61875 An attempt was made to access %1 past its end. 61876 An attempt was made to read from the writing %1. 61877 %1 has a bad format. 61878 %1 contained an unexpected object. 61879 %1 contains an incorrect schema. 61888 pixels