Ну, на самом деле никто не мешает создать его
X++:
static void Copy2Clipboard(Args _args)
{
#winapi
#define.GWL_HINSTANCE (-6)
#define.WM_COPY (0x0301)
#define.EM_SETSEL (0x00B1)
int clipWnd;
int hInstance = winapi::getWindowLong(infolog.hWnd(), #GWL_HINSTANCE);
dll dll = new dll("user32");
dllfunction CreateWindow = new dllfunction(dll, "CreateWindowExA");
str text = "oit weroip t437892573\r\nosfiduasdf7ds98a0\r\lkfdsalk\tgfsdkljglksdfjglsfd;";
;
CreateWindow.arg(ExtTypes::DWord, ExtTypes::String, ExtTypes::String, ExtTypes::DWord, ExtTypes::DWord,
ExtTypes::DWord, ExtTypes::DWord, ExtTypes::DWord, ExtTypes::DWord, ExtTypes::DWord,
ExtTypes::DWord, ExtTypes::DWord);
CreateWindow.returns(ExtTypes::DWord);
clipWnd = CreateWindow.call(0, "EDIT", "AxTSClipboard", #WS_CHILD, 0, 0, 10, 10, infolog.hWnd(), 0, hInstance, 0);
if (clipWnd)
{
winapi::setWindowText(clipWnd, text);
winapi::sendMessageEx(clipWnd, #EM_SETSEL, 0, -1);
winapi::sendMessageEx(clipWnd, #WM_COPY, 0, 0);
winapi::destroyWindow(clipWnd);
}
}
Т.е. с помощью такого подхода можно вообще отказаться от использования TextBuffer
PS и никаких заморочек с раскладкой клавиатуры