A windows API constants, icons, and return codes wrapper.
Project description
win_enum
installation:
pip install win_enum
Constants
win_enum.constants.MB_OKwin_enum.constants.MB_OKCANCELwin_enum.constants.MB_ABORTRETRYIGNOREwin_enum.constants.MB_YESNOCANCELwin_enum.constants.MB_YESNOwin_enum.constants.MB_RETRYCANCEL
icons
win_enum.icons.MB_ICONERRORwin_enum.icons.MB_ICONQUESTIONwin_enum.icons.MB_ICONWARNINGwin_enum.icons.MB_ICONINFORMATION
codes
win_enum.codes.IDOKwin_enum.codes.IDCANCELwin_enum.codes.IDABORTwin_enum.codes.IDRETRYwin_enum.codes.IDIGNOREwin_enum.codes.IDYESwin_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
Release history Release notifications | RSS feed
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.2.tar.gz
(1.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file win_enum-1.0.2.tar.gz.
File metadata
- Download URL: win_enum-1.0.2.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c355ecf089daf6a4415eecd3418469d4be215c2da2cbdf0070e7868dd0667a7
|
|
| MD5 |
700fb0e51fe352f1b031a689cd1a5039
|
|
| BLAKE2b-256 |
3fe01e9453bbcb42295828abe5cf8110337ad3fa22dc1a2174aa2b40b3a5900d
|
File details
Details for the file win_enum-1.0.2-py3-none-any.whl.
File metadata
- Download URL: win_enum-1.0.2-py3-none-any.whl
- Upload date:
- Size: 1.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20409f899797aa23dd64bdcbca1a8ef5d33af832114810ce8379f78afa8d0487
|
|
| MD5 |
4ecd0358b969911738283010c92f764a
|
|
| BLAKE2b-256 |
1e1b4d3ca14a79eca33693b71ebe2c791491d07c496212addc1086475081ac4e
|