Re: why did wxpython MakeActiveXclass stopped working?!?!!?!?



jojoba wrote:

HI
I wrote a little wxpython program with an embedded windows media
player.
It worked great. Recently, I reinstalled windows and then wxpython
(most likely a newer version than i had before). Now when i run the
exact same code, i get this error:

File "C:\Documents and
Settings\jojoba.DEMO-019591FB22\Desktop\Projects\SrAsse
ts\sr.py", line 353, in __init__
self.CreateActiveXplayer()
File "C:\Documents and
Settings\jojoba.DEMO-019591FB22\Desktop\Projects\SrAsse
ts\sr.py", line 363, in CreateActiveXplayer
self.Player = PlayerActiveXClass(self, -1)
File
"C:\Python24\Lib\site-packages\wx-2.6-msw-ansi\wx\lib\activexwrapper.py",
line 108, in axw__init__
(0, 0, sz.width, sz.height), self._wnd, ID)
File "C:\Python24\Lib\site-packages\pythonwin\pywin\mfc\activex.py",
line 23,
in CreateControl
self.__dict__["_obj_"] = win32ui.CreateControl(clsid, windowTitle,
style, re
ct, parent, id, None, False, lic_string)
win32ui: The window can not be created as it has an invalid handle


Here is a snippet from my code:

from wxPython.lib.activexwrapper import MakeActiveXClass
import win32com
from win32com import client

class wxWMPlayer(wxPanel):
def __init__(self, parent):
wxPanel.__init__(self, parent, -1,
style=wxCLIP_CHILDREN|wxNO_FULL_REPAINT_ON_RESIZE)
self.MixMaster = parent
self.ID3data = {}
self.InitWindowProperties()
self.CreateActiveXplayer()

def InitWindowProperties(self):
self.WindowsMediaPlayerTopSizer = wxBoxSizer(wxVERTICAL)
self.SetSizer(self.WindowsMediaPlayerTopSizer)
self.SetAutoLayout(1)

def CreateActiveXplayer(self):
PlayerModule =

win32com.client.gencache.EnsureModule('{6BF52A50-394A-11D3-B153-00C04F79FAA6}',
0,1,0)
PlayerActiveXClass =
MakeActiveXClass(PlayerModule.WindowsMediaPlayer, eventObj = self)
self.Player = PlayerActiveXClass(self, -1)
self.Player.isPlaying = 0
self.Player.uiMode = 'full'
self.WindowsMediaPlayerTopSizer.Add(self.Player, 1, wxEXPAND)


Any ideas anyone...i have reinstalled wxpython to no avail....Please
help anyone....
thanks,
jojoba


Did you reinstall pywin32 ?

Philippe


.



Relevant Pages

  • Re: why did wxpython MakeActiveXclass stopped working?!?!!?!?
    ... I wrote a little wxpython program with an embedded windows media ... player. ... Did you reinstall pywin32? ...
    (comp.lang.python)
  • why did wxpython MakeActiveXclass stopped working?!?!!?!?
    ... I wrote a little wxpython program with an embedded windows media ... player. ... I reinstalled windows and then wxpython ...
    (comp.lang.python)
  • Re: Not installed correctly?
    ... There's ways to change the associations over to the 64bit player, ... You can't download to reinstall on Windows 7. ...
    (microsoft.public.multimedia.windows.mediaplayer)
  • Media Player 10 and FP 2002
    ... I am using Front Page 2002 on a Windows XP Pro machine. ... Should I try to reinstall the series 9 player, and if so will it overwrite the series 10 player? ...
    (microsoft.public.frontpage.client)
  • Media Player and RealOne Player
    ... This includes, of course, Windows ... Media Player, which I use as my default player for all music and video. ... But I am now being prompted to install RealOne ... Am I safe in installing RealOne or should I simply reinstall the earlier ...
    (microsoft.public.windowsmedia.player)