The Python Oracle

How to put a Windows UAC Shield overlay on a button using wxPython?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Puddle Jumping Looping

--

Chapters
00:00 How To Put A Windows Uac Shield Overlay On A Button Using Wxpython?
00:39 Accepted Answer Score 2
01:04 Thank you

--

Full question
https://stackoverflow.com/questions/3097...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #button #wxpython #icons #uac

#avk47



ACCEPTED ANSWER

Score 2


I don't know how to send a Windows message in Python, but I assume you do. You need to send BCM_SETSHIELD with true as the parameter. It will be ignored on XP and earlier. Also make sure the button style is set to FlatStyle.System. The numerical value of BCM_SETSHIELD is 0x0000160C.