# Path: venster/atl.py
# class AxWindow(wtl.Window):
#     def __init__(self, ctrlId, *args, **kwargs):
#     def GetControl(self):
# 
# Path: venster/wtl.py
# class DecoratedWindow(wtl_core.Window):
# class EventDecorator(wtl_core.Event):
# class Icon(wtl_core.WindowsObject):
# class MenuBase(object):
# class Menu(MenuBase, wtl_core.WindowsObject):
# class PopupMenu(MenuBase, wtl_core.WindowsObject):
#     def PostMessage(self, nMsg, wParam = 0, lParam = 0):
#     def SendMessage(self, nMsg, wParam = 0, lParam = 0):
#     def GetClientRect(self):
#     def SetWindowPos(self, hWndInsertAfter, x, y, cx, cy, uFlags):
#     def GetWindowRect(self):
#     def ChildWindowFromPoint(self, point):
#     def ScreenToClient(self, point):
#     def ClientToScreen(self, point):
#     def SetRedraw(self, bRedraw):
#     def SetFont(self, hFont, bRedraw):
#     def SetWindowText(self, txt):
#     def SetText(self, txt):
#     def GetText(self):
#     def MoveWindow(self, x, y, nWidth, nHeight, bRepaint):
#     def GetParent(self):
#     def GetMenu(self):
#     def CenterWindow(self, parent = None):
#     def SetFocus(self):
#     def ShowWindow(self, cmdShow = SW_SHOWNORMAL):
#     def IsWindowVisible(self):
#     def IsIconic(self):
#     def GetClassLong(self, index):
#     def SetClassLong(self, index, dwNewLong):
#     def UpdateWindow(self):
#     def SetCapture(self):
#     def Invalidate(self, bErase = TRUE):
#     def InvalidateRect(self, rc, bErase = TRUE):
#     def GetDCEx(self, hrgnClip, flags):
#     def GetDC(self):
#     def ReleaseDC(self, hdc):
#     def BeginPaint(self, paintStruct):
#     def EndPaint(self, paintStruct):
#     def DestroyWindow(self):
#     def CloseWindow(self):
#     def SetForegroundWindow(self):
#     def EnumChildWindows(self):
#         def enumChildProc(hWnd, lParam):
#     def SetTimer(self, id, elapse, timerProc = NULL):
#     def LockWindowUpdate(self, fLock):
#     def KillTimer(self, id):
#     def GetCursorPos():
#     def getSize(self):
#     def getPosition(self):
#     def getClientPosition(self):
#     def __init__(self, path):
#     def AppendMenu(self, flags, idNewItem, lpNewItem):
#     def EnableMenuItem(self, uIDEnableItem, uEnable):
#     def GetSubMenu(self, id):
#     def GetItemCount(self):
#     def SetMenuDefaultItem(self, uItem, fByPos = False):
#     def __len__(self):
#     def __init__(self, hWnd = None, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def TrackPopupMenuEx(self, fuFlags, x, y, hwnd, lptpm = NULL):
#     def Track(self, hwnd, fuFlags = TPM_LEFTBUTTON):
# 
# Path: venster/lib/form.py
# EXIT_NONE = 0
# EXIT_ONDESTROY = 1 #exit app on destroy of form
# EXIT_ONLASTDESTROY = 2 #exit app on destroy of last form
# ID_NEW = 5001
# ID_OPEN = 5002
# ID_EXIT = 5003
# ID_SAVE = 5004
# ID_SAVEAS = 5005
# ID_CLOSE = 5006
# ID_UNDO = 5101
# ID_REDO = 5102
# ID_COPY = 5103
# ID_PASTE = 5104
# ID_CUT = 5105
# ID_SELECTALL = 5106
# ID_CLEAR = 5107
# ID_HELP_CONTENTS = 5201
# ID_ABOUT = 5202
# CTRL_VIEW = "form_CtrlView"
# CTRL_STATUSBAR = "form_CtrlStatusBar"
# CTRL_COOLBAR = "form_CtrlCoolbar"
# class Controls(dict):
# class Form(Window):
#     class CmdUIUpdateEvent(object):
# class CMD_UI_UPDATE(object):
#     def Add(self, *args):
#     def dispose(self):
#     def __getattr__(self, key):
#     def __init__(self, *args, **kwargs):
#     def dispose(self):
#     def CreateAccels(self):
#     def PreTranslateMessage(self, msg):
#     def OnMenuSelect(self, event):
#         def __init__(self):
#         def Enable(self, fEnable):
#     def OnInitMenuPopup(self, event):
#     def DoLayout(self, cx, cy):
#     def OnDestroy(self, event):
#     def OnSize(self, event):
#     def OnCreate(self, event):
#     def OnExitCmd(self, event):
#     def OnCloseCmd(self, event):
#     def OnClose(self, event):
#     def __init__(self, id, handler):
#     def __install__(self, msgMap):
#     def __call__(self, receiver, event):


from venster import atl
from venster import wtl
from venster.lib import form
## 	   Copyright (c) 2003 Henk Punt

## Permission is hereby granted, free of charge, to any person obtaining
## a copy of this software and associated documentation files (the
## "Software"), to deal in the Software without restriction, including
## without limitation the rights to use, copy, modify, merge, publish,
## distribute, sublicense, and/or sell copies of the Software, and to
## permit persons to whom the Software is furnished to do so, subject to
## the following conditions:

## The above copyright notice and this permission notice shall be
## included in all copies or substantial portions of the Software.

## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
## EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
## MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
## NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
## LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
## OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
## WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE


class MyForm(form.Form):
    _window_title_ = "ATL ActiveX control test"
    
    def OnCreate(self, event):
        #instantiates Windows Media Player by ProgId
        aControl = atl.AxWindow("WMPlayer.OCX", parent = self)

# Path: venster/atl.py
# class AxWindow(wtl.Window):
#     def __init__(self, ctrlId, *args, **kwargs):
#     def GetControl(self):
# 
# Path: venster/wtl.py
# class DecoratedWindow(wtl_core.Window):
# class EventDecorator(wtl_core.Event):
# class Icon(wtl_core.WindowsObject):
# class MenuBase(object):
# class Menu(MenuBase, wtl_core.WindowsObject):
# class PopupMenu(MenuBase, wtl_core.WindowsObject):
#     def PostMessage(self, nMsg, wParam = 0, lParam = 0):
#     def SendMessage(self, nMsg, wParam = 0, lParam = 0):
#     def GetClientRect(self):
#     def SetWindowPos(self, hWndInsertAfter, x, y, cx, cy, uFlags):
#     def GetWindowRect(self):
#     def ChildWindowFromPoint(self, point):
#     def ScreenToClient(self, point):
#     def ClientToScreen(self, point):
#     def SetRedraw(self, bRedraw):
#     def SetFont(self, hFont, bRedraw):
#     def SetWindowText(self, txt):
#     def SetText(self, txt):
#     def GetText(self):
#     def MoveWindow(self, x, y, nWidth, nHeight, bRepaint):
#     def GetParent(self):
#     def GetMenu(self):
#     def CenterWindow(self, parent = None):
#     def SetFocus(self):
#     def ShowWindow(self, cmdShow = SW_SHOWNORMAL):
#     def IsWindowVisible(self):
#     def IsIconic(self):
#     def GetClassLong(self, index):
#     def SetClassLong(self, index, dwNewLong):
#     def UpdateWindow(self):
#     def SetCapture(self):
#     def Invalidate(self, bErase = TRUE):
#     def InvalidateRect(self, rc, bErase = TRUE):
#     def GetDCEx(self, hrgnClip, flags):
#     def GetDC(self):
#     def ReleaseDC(self, hdc):
#     def BeginPaint(self, paintStruct):
#     def EndPaint(self, paintStruct):
#     def DestroyWindow(self):
#     def CloseWindow(self):
#     def SetForegroundWindow(self):
#     def EnumChildWindows(self):
#         def enumChildProc(hWnd, lParam):
#     def SetTimer(self, id, elapse, timerProc = NULL):
#     def LockWindowUpdate(self, fLock):
#     def KillTimer(self, id):
#     def GetCursorPos():
#     def getSize(self):
#     def getPosition(self):
#     def getClientPosition(self):
#     def __init__(self, path):
#     def AppendMenu(self, flags, idNewItem, lpNewItem):
#     def EnableMenuItem(self, uIDEnableItem, uEnable):
#     def GetSubMenu(self, id):
#     def GetItemCount(self):
#     def SetMenuDefaultItem(self, uItem, fByPos = False):
#     def __len__(self):
#     def __init__(self, hWnd = None, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def TrackPopupMenuEx(self, fuFlags, x, y, hwnd, lptpm = NULL):
#     def Track(self, hwnd, fuFlags = TPM_LEFTBUTTON):
# 
# Path: venster/lib/form.py
# EXIT_NONE = 0
# EXIT_ONDESTROY = 1 #exit app on destroy of form
# EXIT_ONLASTDESTROY = 2 #exit app on destroy of last form
# ID_NEW = 5001
# ID_OPEN = 5002
# ID_EXIT = 5003
# ID_SAVE = 5004
# ID_SAVEAS = 5005
# ID_CLOSE = 5006
# ID_UNDO = 5101
# ID_REDO = 5102
# ID_COPY = 5103
# ID_PASTE = 5104
# ID_CUT = 5105
# ID_SELECTALL = 5106
# ID_CLEAR = 5107
# ID_HELP_CONTENTS = 5201
# ID_ABOUT = 5202
# CTRL_VIEW = "form_CtrlView"
# CTRL_STATUSBAR = "form_CtrlStatusBar"
# CTRL_COOLBAR = "form_CtrlCoolbar"
# class Controls(dict):
# class Form(Window):
#     class CmdUIUpdateEvent(object):
# class CMD_UI_UPDATE(object):
#     def Add(self, *args):
#     def dispose(self):
#     def __getattr__(self, key):
#     def __init__(self, *args, **kwargs):
#     def dispose(self):
#     def CreateAccels(self):
#     def PreTranslateMessage(self, msg):
#     def OnMenuSelect(self, event):
#         def __init__(self):
#         def Enable(self, fEnable):
#     def OnInitMenuPopup(self, event):
#     def DoLayout(self, cx, cy):
#     def OnDestroy(self, event):
#     def OnSize(self, event):
#     def OnCreate(self, event):
#     def OnExitCmd(self, event):
#     def OnCloseCmd(self, event):
#     def OnClose(self, event):
#     def __init__(self, id, handler):
#     def __install__(self, msgMap):
#     def __call__(self, receiver, event):


# Path: test/test_atl.py
from venster import atl
from venster import wtl
from venster.lib import form

## 	   Copyright (c) 2003 Henk Punt

## Permission is hereby granted, free of charge, to any person obtaining
## a copy of this software and associated documentation files (the
## "Software"), to deal in the Software without restriction, including
## without limitation the rights to use, copy, modify, merge, publish,
## distribute, sublicense, and/or sell copies of the Software, and to
## permit persons to whom the Software is furnished to do so, subject to
## the following conditions:

## The above copyright notice and this permission notice shall be
## included in all copies or substantial portions of the Software.

## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
## EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
## MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
## NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
## LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
## OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
## WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE


class MyForm(form.Form):
    _window_title_ = "ATL ActiveX control test"
    
    def OnCreate(self, event):
        #instantiates Windows Media Player by ProgId
        aControl = atl.AxWindow("WMPlayer.OCX", parent = self)

        self.controls[form.CTRL_VIEW] = aControl