Skip to main content

A windows API constants, icons, and return codes wrapper.

Project description

win_enum

installation:

pip install win_enum

Constants

  • win_enum.constants.MB_OK
  • win_enum.constants.MB_OKCANCEL
  • win_enum.constants.MB_ABORTRETRYIGNORE
  • win_enum.constants.MB_YESNOCANCEL
  • win_enum.constants.MB_YESNO
  • win_enum.constants.MB_RETRYCANCEL

icons

  • win_enum.icons.MB_ICONERROR
  • win_enum.icons.MB_ICONQUESTION
  • win_enum.icons.MB_ICONWARNING
  • win_enum.icons.MB_ICONINFORMATION

codes

  • win_enum.codes.IDOK
  • win_enum.codes.IDCANCEL
  • win_enum.codes.IDABORT
  • win_enum.codes.IDRETRY
  • win_enum.codes.IDIGNORE
  • win_enum.codes.IDYES
  • win_enum.codes.IDNO

Example usage

import win_enum
import ctypes

user32 = ctypes.windll.user32
result = user32.MessageBoxW(None, "Do you like cats?", "Cats?", win_enum.constants.MB_YESNO | win_enum.icons.MB_ICONQUESTION)

if result == win_enum.codes.IDYES:
    user32.MessageBoxW(None, "You like cats! :)", "Yes", win_enum.constants.MB_OK | win_enum.icons.MB_ICONINFORMATION)
    
elif result == win_enum.codes.IDNO:
    user32.MessageBoxW(None, "You don't like cats! :(", "No", win_enum.constants.MB_OK | win_enum.icons.MB_ICONINFORMATION)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

win_enum-1.0.0.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

win_enum-1.0.0-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file win_enum-1.0.0.tar.gz.

File metadata

  • Download URL: win_enum-1.0.0.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for win_enum-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2a586ad2164ed237db223c90baf858309dbd323c59d4bdbde1a3aa72eefb2d5e
MD5 7f240f5d104980003c6f81597aa05aa5
BLAKE2b-256 bfae64c7a7a224511e5eacac83fbccb64dc162ff8e34da60dc27d5806d039104

See more details on using hashes here.

File details

Details for the file win_enum-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: win_enum-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for win_enum-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3d021e7d41243f5694a9b65e5095be3834a4a0ea04283c5f02b571d2d3cd108
MD5 d1aa4d91f8aef22df73230086ec16037
BLAKE2b-256 fb1e68d77e4a7e668e79bb5d0f8d97c77d7daf878f3d130d60b085a45b6fa596

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page