We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non English programs, clipboard paste error code solution:
Move "#include <Clipbrd.hpp>" from "Misc.cpp" to "Misc.h"
In Misc.h add: //Add by ZGL-------------------------------------------------------------- class TUnicodeClipboard : public TClipboard { private: WideString __fastcall GetAsUnicodeText(); void __fastcall SetAsUnicodeText(const WideString Value); public: __property WideString AsUnicodeText = {read=GetAsUnicodeText, write=SetAsUnicodeText}; }; //---------------------------------------------------------------------------
In Misc.cpp add: //Add by ZGL-------------------------------------------------------------- WideString __fastcall TUnicodeClipboard::GetAsUnicodeText() { WideString res; Open(); HANDLE data = GetClipboardData(CF_UNICODETEXT); try { if (data) res = (wchar_t *)GlobalLock(data); else res = ""; } __finally { if (data) GlobalUnlock(data); Close(); } return res; } //Add by ZGL---------------------------------------------------------------- void __fastcall TUnicodeClipboard::SetAsUnicodeText(const WideString Value) { SetBuffer(CF_UNICODETEXT, (wchar_t *)Value, (wcslen(Value) + 1) * sizeof(WideChar)); } //---------------------------------------------------------------------------
Then, all "Clipboard()->AsText =" in the program are changed to: “((TUnicodeClipboard *)Clipboard())->AsUnicodeText =”;
All "Clipboard()->SetTextBuf (??)" are changed to: "((TUnicodeClipboard *)Clipboard())->AsUnicodeText =??"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Non English programs, clipboard paste error code solution:
Move "#include <Clipbrd.hpp>" from "Misc.cpp" to "Misc.h"
In Misc.h add:
//Add by ZGL--------------------------------------------------------------
class TUnicodeClipboard : public TClipboard
{
private:
WideString __fastcall GetAsUnicodeText();
void __fastcall SetAsUnicodeText(const WideString Value);
public:
__property WideString AsUnicodeText = {read=GetAsUnicodeText, write=SetAsUnicodeText};
};
//---------------------------------------------------------------------------
In Misc.cpp add:
//Add by ZGL--------------------------------------------------------------
WideString __fastcall TUnicodeClipboard::GetAsUnicodeText()
{
WideString res;
Open();
HANDLE data = GetClipboardData(CF_UNICODETEXT);
try
{
if (data)
res = (wchar_t *)GlobalLock(data);
else
res = "";
}
__finally
{
if (data) GlobalUnlock(data);
Close();
}
return res;
}
//Add by ZGL----------------------------------------------------------------
void __fastcall TUnicodeClipboard::SetAsUnicodeText(const WideString Value)
{
SetBuffer(CF_UNICODETEXT, (wchar_t *)Value, (wcslen(Value) + 1) * sizeof(WideChar));
}
//---------------------------------------------------------------------------
Then, all "Clipboard()->AsText =" in the program are changed to:
“((TUnicodeClipboard *)Clipboard())->AsUnicodeText =”;
All "Clipboard()->SetTextBuf (??)" are changed to:
"((TUnicodeClipboard *)Clipboard())->AsUnicodeText =??"
The text was updated successfully, but these errors were encountered: