DROPEFFECT CEditDropTargetImpl::
OnDragEnter (CWnd * pWnd, COleDataObject * pDataObject, DWORD dwKeyState, CPoint point)
{
- UINT fmt = GetClipTcharTextFormat();
+ UINT fmt = CCrystalTextView::GetClipTcharTextFormat();
if (!pDataObject->IsDataAvailable (fmt))
{
if (m_pAlternateDropTarget)
// if ((pDataObject->IsDataAvailable( CF_TEXT ) ) || // If Text Available
// ( pDataObject -> IsDataAvailable( xxx ) ) || // Or xxx Available
// ( pDataObject -> IsDataAvailable( yyy ) ) ) // Or yyy Available
- UINT fmt = GetClipTcharTextFormat(); // CF_TEXT or CF_UNICODETEXT
+ UINT fmt = CCrystalTextView::GetClipTcharTextFormat(); // CF_TEXT or CF_UNICODETEXT
if (pDataObject->IsDataAvailable (fmt)) // If Text Available
{
// if( ( pDataObject -> IsDataAvailable( CF_TEXT ) ) || // If Text Available
// ( pDataObject -> IsDataAvailable( xxx ) ) || // Or xxx Available
// ( pDataObject -> IsDataAvailable( yyy ) ) ) // Or yyy Available
- UINT fmt = GetClipTcharTextFormat(); // CF_TEXT or CF_UNICODETEXT
+ UINT fmt = CCrystalTextView::GetClipTcharTextFormat(); // CF_TEXT or CF_UNICODETEXT
if (pDataObject->IsDataAvailable (fmt)) // If Text Available
{
SyntaxColors * GetSyntaxColors() { return m_pColors; }
void SetColorContext(SyntaxColors * pColors) { m_pColors = pColors; }
+ static int GetClipTcharTextFormat() { return sizeof(TCHAR) == 1 ? CF_TEXT : CF_UNICODETEXT; }
+
protected :
CPoint WordToRight (CPoint pt);
CPoint WordToLeft (CPoint pt);
#include "ClipBoard.h"
-inline UINT GetClipTcharTextFormat() { return (sizeof(TCHAR) == 1 ? CF_TEXT : CF_UNICODETEXT); }
-
/**
* @brief Copies string to clipboard.
* @param [in] text Text to copy to clipboard.
#include <windows.h>
#include "UnicodeString.h"
+inline UINT GetClipTcharTextFormat() { return (sizeof(TCHAR) == 1 ? CF_TEXT : CF_UNICODETEXT); }
+
bool PutToClipboard(const String & text, HWND currentWindowHandle);
bool GetFromClipboard(String & text, HWND currentWindowHandle);
nIDHelp = nIDPrompt;
return AfxMessageBox(string.c_str(), nType, nIDHelp);
}
-
-
-// Get appropriate clipboard format for TCHAR text
-int GetClipTcharTextFormat()
-{
-#ifdef _UNICODE
- return CF_UNICODETEXT;
-#else
- return CF_TEXT;
-#endif // _UNICODE
-}
-
/** @brief Lang aware version of AfxMessageBox() */
int NTAPI LangMessageBox(UINT, UINT nType = MB_OK, UINT nIDHelp = (UINT)-1);
- /** @brief Get appropriate clipboard format for TCHAR text, ie, CF_TEXT or CF_UNICODETEXT */
-int GetClipTcharTextFormat();
-
/** @brief include for the custom dialog boxes, with do not ask/display again */
#include "MessageBoxDialog.h"