Files
cefsharp/CefSharp.Core/NativeMethodWrapper.cpp
T
amaitland eabbcf64c1 Remove pragma once from cpp files, only needed in header files
(Was just adding to every file before without really thinking what I was doing, pretty harmless regardless).
2015-05-04 15:04:03 +10:00

24 lines
747 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.
#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);
}
}