Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Windows

Perry compiles TypeScript apps for Windows using the Win32 API.

Requirements

  • Visual Studio Build Tools with “Desktop development with C++” workload
  • Windows 10 or later

Building

perry app.ts -o app.exe --target windows

UI Toolkit

Perry maps UI widgets to Win32 controls:

Perry WidgetWin32 Class
TextStatic HWND
ButtonHWND Button
TextFieldEdit HWND
SecureFieldEdit (ES_PASSWORD)
ToggleCheckbox
SliderTrackbar (TRACKBAR_CLASSW)
PickerComboBox
ProgressViewPROGRESS_CLASSW
ImageGDI
VStack/HStackManual layout
ScrollViewWS_VSCROLL
CanvasGDI drawing
Form/SectionGroupBox

Windows-Specific APIs

  • Menu bar: HMENU / SetMenu
  • Dark mode: Windows Registry detection
  • Preferences: Windows Registry
  • Keychain: CredWrite/CredRead/CredDelete (Windows Credential Manager)
  • Notifications: Toast notifications
  • File dialogs: IFileOpenDialog / IFileSaveDialog (COM)
  • Alerts: MessageBoxW
  • Open URL: ShellExecuteW

Next Steps