Skip to content

Commit

Permalink
SwiftWin32: enable tab control in ComCtl32
Browse files Browse the repository at this point in the history
Enable the tab control behaviours for Common Controls to allow us to
build out some of the tab view handling.
  • Loading branch information
compnerd committed Dec 29, 2023
1 parent 0704e2e commit 45a9e4e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public func ApplicationMain(_ argc: Int32,
| DWORD(ICC_NATIVEFNTCTL_CLASS)
| DWORD(ICC_PROGRESS_CLASS)
| DWORD(ICC_STANDARD_CLASSES)
| DWORD(ICC_TAB_CLASSES)
var ICCE: INITCOMMONCONTROLSEX =
INITCOMMONCONTROLSEX(dwSize: DWORD(MemoryLayout<INITCOMMONCONTROLSEX>.size),
dwICC: dwICC)
Expand Down
15 changes: 15 additions & 0 deletions Sources/SwiftWin32/Support/WinSDK+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,21 @@ internal var QS_ALLINPUT: DWORD {
DWORD(QS_INPUT) | DWORD(QS_POSTMESSAGE) | DWORD(QS_TIMER) | DWORD(QS_PAINT) | DWORD(QS_HOTKEY) | DWORD(QS_SENDMESSAGE)
}

@_transparent
internal var TCS_BOTTOM: DWORD {
DWORD(WinSDK.TCS_BOTTOM)
}

@_transparent
internal var TCS_FIXEDWIDTH: DWORD {
DWORD(WinSDK.TCS_FIXEDWIDTH)
}

@_transparent
internal var TCS_FLATBUTTONS: DWORD {
DWORD(WinSDK.TCS_FLATBUTTONS)
}

@_transparent
internal var WS_BORDER: DWORD {
DWORD(WinSDK.WS_BORDER)
Expand Down

0 comments on commit 45a9e4e

Please sign in to comment.