Skip to content

Commit

Permalink
Removing additional styles from putty.
Browse files Browse the repository at this point in the history
This gives a better look/feel on the inner window. At least on
Win7, there's no more raised border for the inner child window.
  • Loading branch information
peaches committed May 19, 2012
1 parent 9010a2d commit ea4dd72
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
31 changes: 31 additions & 0 deletions SuperPutty/Classes/WinAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,37 @@ public enum AnimateWindowFlags
AW_BLEND = 0x00080000
}

public static class WindowStyles
{
public static readonly Int32
WS_BORDER = 0x00800000,
WS_CAPTION = 0x00C00000,
WS_CHILD = 0x40000000,
WS_CHILDWINDOW = 0x40000000,
WS_CLIPCHILDREN = 0x02000000,
WS_CLIPSIBLINGS = 0x04000000,
WS_DISABLED = 0x08000000,
WS_DLGFRAME = 0x00400000,
WS_GROUP = 0x00020000,
WS_HSCROLL = 0x00100000,
WS_ICONIC = 0x20000000,
WS_MAXIMIZE = 0x01000000,
WS_MAXIMIZEBOX = 0x00010000,
WS_MINIMIZE = 0x20000000,
WS_MINIMIZEBOX = 0x00020000,
WS_OVERLAPPED = 0x00000000,
WS_OVERLAPPEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
WS_POPUP = unchecked((int)0x80000000),
WS_POPUPWINDOW = WS_POPUP | WS_BORDER | WS_SYSMENU,
WS_SIZEBOX = 0x00040000,
WS_SYSMENU = 0x00080000,
WS_TABSTOP = 0x00010000,
WS_THICKFRAME = 0x00040000,
WS_TILED = 0x00000000,
WS_TILEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
WS_VISIBLE = 0x10000000,
WS_VSCROLL = 0x00200000;
}

/// <summary>Enumeration of the different ways of showing a window using
/// ShowWindow</summary>
Expand Down
6 changes: 5 additions & 1 deletion SuperPutty/ctlApplicationPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ protected override void OnVisibleChanged(EventArgs e)

// set window parameters (how it's displayed)
int lStyle = WinAPI.GetWindowLong(m_AppWin, WinAPI.GWL_STYLE);
lStyle &= ~(WinAPI.WS_BORDER | WinAPI.WS_THICKFRAME);
lStyle &= ~(WinAPI.WindowStyles.WS_CAPTION
| WinAPI.WindowStyles.WS_THICKFRAME
| WinAPI.WindowStyles.WS_MINIMIZE
| WinAPI.WindowStyles.WS_MAXIMIZE
| WinAPI.WindowStyles.WS_SYSMENU);
WinAPI.SetWindowLong(m_AppWin, WinAPI.GWL_STYLE, lStyle);

// Move the child so it's located over the parent
Expand Down

0 comments on commit ea4dd72

Please sign in to comment.