Is it possible? If yes, how?

Recommended Answers

Have you checked wxpython demo?
if no Download it and play around with it
http://downloads.sourceforge.net/wxpython/wxPython2.8-win32-docs-demos-2.8.10.1.exe

Not sure if it is possible

Jump to Post

I dont know. May be wxpython lists may be best place for the question. Don't forget to be back when you have an answer:
http://www.wxpython.org/maillist.php

Jump to Post
Answered by scru 909 in a post from

Yes there is a way. Use python's ctypes

Maybe someone else can give you an example of how to use it. Or maybe you can just look at the documentation (it's not …

Jump to Post

All 10 Replies

Yes, I've already seen that, but there's no such thing... I hear it's a windows vista api called dwm. Is there a way to access it from python?

Yes there is a way. Use python's ctypes

Maybe someone else can give you an example of how to use it. Or maybe you can just look at the documentation (it's not hard).

but how do I access that dll, I mean where is it placed. it should be dwm.dll or something (desktop window manager)

You don't need to know where the dll is placed (you don't redistribute it). In your python code, you just do:

import ctypes.windll.dwmapi as dwm

There is no such module

Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import ctypes.windll.dwmapi as dwm
ImportError: No module named windll.dwmapi

There is no such module

Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import ctypes.windll.dwmapi as dwm
ImportError: No module named windll.dwmapi

Yeah that's my bad:

import ctypes

dwm = ctypes.windll.dwmapi

What should I do now? Sorry, I have no clue about ctypes.

I don't know :-/. I don't even really know what exactly you're trying to do except that it involves dwmapi.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.