mirror of https://github.com/x64dbg/TitanEngine
bugfixing GUI
This commit is contained in:
parent
b4217f1d11
commit
3f824021eb
|
|
@ -133,30 +133,47 @@ INT_PTR CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
case IDC_COPY: {
|
case IDC_COPY: {
|
||||||
//get lines
|
//get lines
|
||||||
int cnt = SendMessage(hLogBox, LB_GETCOUNT, 0, 0);
|
LRESULT cnt = SendMessage(hLogBox, LB_GETCOUNT, 0, 0);
|
||||||
TCHAR buf[MAX_LOG_LINE_LENGTH] = {0};
|
|
||||||
TCHAR copy[MAX_LOG_LINE_COUNT*MAX_LOG_LINE_LENGTH] = {0};
|
|
||||||
|
|
||||||
for(int i=0; i<MAX_LOG_LINE_COUNT; i++) {
|
if (cnt != 0 && cnt != LB_ERR)
|
||||||
SendMessage(hLogBox, LB_GETTEXT, i, (LPARAM)buf);
|
{
|
||||||
lstrcat(copy, buf);
|
TCHAR buf[MAX_LOG_LINE_LENGTH] = {0};
|
||||||
lstrcat(copy, L"\n");
|
TCHAR copy[MAX_LOG_LINE_COUNT*MAX_LOG_LINE_LENGTH*3] = {0};
|
||||||
|
|
||||||
|
for(LRESULT i=0; i<cnt; i++) {
|
||||||
|
if (SendMessage(hLogBox, LB_GETTEXT, i, (LPARAM)buf) != LB_ERR)
|
||||||
|
{
|
||||||
|
_tcscat(copy, buf);
|
||||||
|
_tcscat(copy, L"\r\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//copy to clipboard
|
||||||
|
HGLOBAL clipbuffer;
|
||||||
|
TCHAR* buffer;
|
||||||
|
clipbuffer = GlobalAlloc(GMEM_MOVEABLE, (_tcslen(copy) + 1) * sizeof(TCHAR));
|
||||||
|
if (clipbuffer)
|
||||||
|
{
|
||||||
|
buffer = (TCHAR*)GlobalLock(clipbuffer);
|
||||||
|
_tcscpy(buffer, copy);
|
||||||
|
GlobalUnlock(clipbuffer);
|
||||||
|
OpenClipboard(NULL);
|
||||||
|
EmptyClipboard();
|
||||||
|
UINT format;
|
||||||
|
#ifdef UNICODE
|
||||||
|
format = CF_UNICODETEXT;
|
||||||
|
#else
|
||||||
|
format = CF_OEMTEXT;
|
||||||
|
#endif
|
||||||
|
SetClipboardData(format, clipbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
CloseClipboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy to clipboard
|
|
||||||
HGLOBAL clipbuffer;
|
|
||||||
TCHAR* buffer;
|
|
||||||
clipbuffer = GlobalAlloc(GMEM_DDESHARE, sizeof(copy));
|
|
||||||
buffer = (TCHAR*)GlobalLock(clipbuffer);
|
|
||||||
wcscpy(buffer, copy);
|
|
||||||
GlobalUnlock(clipbuffer);
|
|
||||||
OpenClipboard(NULL);
|
|
||||||
EmptyClipboard();
|
|
||||||
SetClipboardData(CF_UNICODETEXT,clipbuffer);
|
|
||||||
CloseClipboard();
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|
@ -142,6 +143,7 @@
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue