Winforms launcher beginnings.

This commit is contained in:
Matthew Bowra-Dean
2010-10-26 03:04:49 +13:00
committed by Paul Chote
parent d93c42e89c
commit 439c366ba2
13 changed files with 5556 additions and 21 deletions

26
OpenRA.Launcher/Util.cs Normal file
View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace OpenRA.Launcher
{
static class Util
{
[DllImport("user32")]
public static extern UInt32 SendMessage
(IntPtr hWnd, UInt32 msg, UInt32 wParam, UInt32 lParam);
internal const int BCM_FIRST = 0x1600; //Normal button
internal const int BCM_SETSHIELD = (BCM_FIRST + 0x000C); //Elevated button
static public void UacShield(Button b)
{
b.FlatStyle = FlatStyle.System;
SendMessage(b.Handle, BCM_SETSHIELD, 0, 0xFFFFFFFF);
}
}
}