Skip to content

Commit

Permalink
fixed some code analysis warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcadeRenegade committed Feb 8, 2016
1 parent 2915118 commit d22e206
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SidebarDiagnostics/Windows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ public static bool SupportVirtualDesktop
internal static class NativeMethods
{
[DllImport("user32.dll")]
internal static extern int GetWindowLongPtr(IntPtr hwnd, int index);
internal static extern long GetWindowLongPtr(IntPtr hwnd, int index);

[DllImport("user32.dll")]
internal static extern int SetWindowLongPtr(IntPtr hwnd, int index, int newStyle);
internal static extern long SetWindowLongPtr(IntPtr hwnd, int index, long newStyle);

[DllImport("user32.dll")]
internal static extern bool SetWindowPos(IntPtr hwnd, IntPtr hwnd_after, int x, int y, int cx, int cy, uint uflags);
Expand Down Expand Up @@ -913,15 +913,15 @@ public void SetBottom()
public void SetClickThrough()
{
IntPtr _hwnd = new WindowInteropHelper(this).Handle;
int _style = NativeMethods.GetWindowLongPtr(_hwnd, WND_STYLE.GWL_EXSTYLE);
int _style = (int)NativeMethods.GetWindowLongPtr(_hwnd, WND_STYLE.GWL_EXSTYLE);

NativeMethods.SetWindowLongPtr(_hwnd, WND_STYLE.GWL_EXSTYLE, _style | WND_STYLE.WS_EX_TRANSPARENT);
}

public void ClearClickThrough()
{
IntPtr _hwnd = new WindowInteropHelper(this).Handle;
int _style = NativeMethods.GetWindowLongPtr(_hwnd, WND_STYLE.GWL_EXSTYLE);
int _style = (int)NativeMethods.GetWindowLongPtr(_hwnd, WND_STYLE.GWL_EXSTYLE);

NativeMethods.SetWindowLongPtr(_hwnd, WND_STYLE.GWL_EXSTYLE, _style & ~WND_STYLE.WS_EX_TRANSPARENT);
}
Expand Down

0 comments on commit d22e206

Please sign in to comment.