Files
cefsharp/CefSharp.Core/NativeMethodWrapper.cpp
T
rassilon 7128e40fd1 It's time for copyright updates again. Yay!
Throw in a couple of tab containing files for good measure.
Evil tabs, evil I say.
2015-04-25 02:45:21 -04:00

26 lines
761 B
C++

// Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "NativeMethodWrapper.h"
using namespace System;
namespace CefSharp
{
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);
}
}