Menu

[327ada]: / Source / Tools / LangCheck / resource.cpp  Maximize  Restore  History

Download this file

23 lines (17 with data), 507 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "resource.h"
HWND LogBoxHandle;
void Log(const char* format,...) {
if(!LogBoxHandle) {
return;
}
va_list parameters;
char text[2048] = "";
// Format final message
va_start(parameters,format);
vsnprintf(text,2048,format,parameters);
va_end(parameters);
// Append to log
int OldLen = SendMessage(LogBoxHandle,WM_GETTEXTLENGTH,0,0);
SendMessage(LogBoxHandle,EM_SETSEL,(WPARAM)OldLen,(LPARAM)OldLen);
SendMessage(LogBoxHandle,EM_REPLACESEL,0,(LPARAM)text);
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.