aboutsummaryrefslogtreecommitdiff
path: root/EditorThread.cpp
blob: 5030f5af313503f557f877fffd2e87ba8f94c312 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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;	
}