Beispiel #1
0
void GxLog::BlockStart(GxLogType type, const char* component)
{
	myType = type;

	char buffer[BUFFER_SIZE];
	SprintF(buffer, "%-13s:", component);
	const GxString line('-', LINE_W);

	GxSystemInterface::Get()->LogMessage(myType, buffer);
	GxSystemInterface::Get()->LogMessage(myType, line.Raw());
	myIsInBlock = true;
}
void GxSystemInterfaceWin32::SetClipboardText(const GxString& text)
{
	if(!OpenClipboard(NULL)) return;

	std::wstring wstr;
	ToUTF16(wstr, text.Raw());
	GxList<char> cstr = Narrow(wstr.c_str());

	EmptyClipboard();
	HGLOBAL bufferHandle = GlobalAlloc(GMEM_DDESHARE, cstr.Size());
	char* buffer = (char*)GlobalLock(bufferHandle);
	if(buffer != NULL)
	{
		memcpy(buffer, cstr.Data(), cstr.Size());
		SetClipboardData(CF_TEXT, bufferHandle);
	}
	GlobalUnlock(bufferHandle);
	CloseClipboard();
}
Beispiel #3
0
void GxLog::BlockEnd()
{
	const GxString line('-', LINE_W);
	GxSystemInterface::Get()->LogMessage(myType, line.Raw());
	myIsInBlock = false;
}