mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
Remove User32.cs and implement Focused methods in NativeMethodWrapper
This commit is contained in:
@@ -11,8 +11,15 @@ using namespace System;
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
void NativeMethodWrapper::CopyMemoryUsingHandle(IntPtr^ dest, IntPtr^ src, int numberOfBytes)
|
||||
{
|
||||
CopyMemory(dest->ToPointer(), src->ToPointer(), numberOfBytes);
|
||||
}
|
||||
void NativeMethodWrapper::CopyMemoryUsingHandle(IntPtr^ dest, IntPtr^ src, int numberOfBytes)
|
||||
{
|
||||
CopyMemory(dest->ToPointer(), src->ToPointer(), numberOfBytes);
|
||||
}
|
||||
|
||||
bool NativeMethodWrapper::IsFocused(IntPtr handle)
|
||||
{
|
||||
// Ask Windows which control has the focus and then check if it's one of our children
|
||||
auto focusControl = GetFocus();
|
||||
return focusControl != 0 && (IsChild((HWND)handle.ToPointer(), focusControl) == 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user