refactor Interop classes
This commit is contained in:
1 parent
de5c2e7a6e
commit
a3dd633a66
28 files changed
+948
-976
No files matched your search
@@ -24,19 +24,19 @@ namespace HandyControl.Tools
|
||||
if (HWndSource != null)
|
||||
{
|
||||
HWndSource.AddHook(WinProc);
|
||||
NativeMethods.AddClipboardFormatListener(HookId);
|
||||
InteropMethods.AddClipboardFormatListener(HookId);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Stop()
|
||||
{
|
||||
HWndSource.RemoveHook(WinProc);
|
||||
NativeMethods.RemoveClipboardFormatListener(HookId);
|
||||
InteropMethods.RemoveClipboardFormatListener(HookId);
|
||||
}
|
||||
|
||||
private static IntPtr WinProc(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam, ref bool handled)
|
||||
{
|
||||
if (msg == NativeMethods.WM_CLIPBOARDUPDATE)
|
||||
if (msg == InteropValues.WM_CLIPBOARDUPDATE)
|
||||
{
|
||||
ContentChanged?.Invoke();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user