コード例 #1
0
 private void RegisterClass()
 {
     var wc = new WindowClassEx
     {
         Size = WindowClassEx.SizeInBytes,
         Style = WindowClassStyle.HRedraw|WindowClassStyle.VRedraw|WindowClassStyle.OwnDC,
         WndProc = WindowProcedure,
         Instance = _instance,
         ClassName = _className,
         Cursor = User32.LoadCursor(CursorName.Arrow)
     };
     if (User32.RegisterClassEx(ref wc) == 0)
         throw new Exception(String.Format("Failed to reg class. Error: {0}", Marshal.GetLastWin32Error()));
 }
コード例 #2
0
ファイル: User32.cs プロジェクト: veggielane/CasualScience
 public static extern ushort RegisterClassEx(ref WindowClassEx windowClass);