本文整理汇总了C++中KeyEvent::GetCharData方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyEvent::GetCharData方法的具体用法?C++ KeyEvent::GetCharData怎么用?C++ KeyEvent::GetCharData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KeyEvent
的用法示例。
在下文中一共展示了KeyEvent::GetCharData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: s_MouseInputTestCallback
static void s_MouseInputTestCallback(_Inout_ std::deque<std::unique_ptr<IInputEvent>>& events)
{
Log::Comment(L"MouseInput successfully generated a sequence for the input, and sent it.");
size_t cInputExpected = 0;
VERIFY_SUCCEEDED(StringCchLengthW(s_pwszInputExpected, STRSAFE_MAX_CCH, &cInputExpected));
if (VERIFY_ARE_EQUAL(cInputExpected, events.size(), L"Verify expected and actual input array lengths matched."))
{
Log::Comment(L"We are expecting always key events and always key down. All other properties should not be written by simulated keys.");
for (size_t i = 0; i < events.size(); ++i)
{
KeyEvent expectedKeyEvent(TRUE, 1, 0, 0, s_pwszInputExpected[i], 0);
KeyEvent testKeyEvent = *static_cast<const KeyEvent* const>(events[i].get());
VERIFY_ARE_EQUAL(expectedKeyEvent, testKeyEvent,
NoThrowString().Format(L"Chars='%c','%c'",
s_pwszInputExpected[i],
testKeyEvent.GetCharData()));
}
}
}