From 5157decd47710b3ed8e4e62e79e07aa1967bd532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Vehvil=C3=A4inen?= Date: Wed, 19 Jun 2002 15:00:09 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r14, which included commits to RCS files with non-trunk default branches. svn path=/trunk/externals/vst/; revision=15 --- EditorThread.cpp | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 EditorThread.cpp (limited to 'EditorThread.cpp') diff --git a/EditorThread.cpp b/EditorThread.cpp new file mode 100644 index 0000000..5030f5a --- /dev/null +++ b/EditorThread.cpp @@ -0,0 +1,59 @@ +// EditorThread.cpp : implementation file +// + +#include "stdafx.h" +#include "vst.h" +#include "EditorThread.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CEditorThread + +IMPLEMENT_DYNCREATE(CEditorThread, CWinThread) + +CEditorThread::CEditorThread() +{ + pop = NULL; +} + +CEditorThread::~CEditorThread() +{ +} + +BOOL CEditorThread::InitInstance() +{ + pop = new CPopupWindow(); + m_pMainWnd = pop; + pop->CreateEx( WS_EX_DLGMODALFRAME , AfxRegisterWndClass( CS_DBLCLKS) ," VST window" , WS_CAPTION | WS_THICKFRAME | WS_POPUP | WS_SYSMENU , 10 , 10 , 300 , 300 , NULL , NULL , NULL); + pop->SetPlugin( plug ); + pop->DoInit(); + pop->ShowWindow( SW_SHOW ); + pop->BringWindowToTop(); + pop->SetFocus(); + return TRUE; +} + +int CEditorThread::ExitInstance() +{ + // TODO: perform any per-thread cleanup here + return CWinThread::ExitInstance(); +} + +BEGIN_MESSAGE_MAP(CEditorThread, CWinThread) + //{{AFX_MSG_MAP(CEditorThread) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CEditorThread message handlers + +void CEditorThread::SetPlugin(VSTPlugin *p) +{ + plug = p; +} -- cgit v1.2.1