MCPcopy Create free account
hub / github.com/audacity/audacity / Create

Method Create

src/effects/VST/VSTControlMSW.cpp:30–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30bool VSTControl::Create(wxWindow *parent, VSTLink *link)
31{
32 if (!VSTControlBase::Create(parent, link))
33 {
34 return false;
35 }
36
37 VstRect *rect;
38
39 // Some effects like to have us get their rect before opening them.
40 mLink->callDispatcher(effEditGetRect, 0, 0, &rect, 0.0);
41
42 // Get the native handle
43 mHwnd = GetHWND();
44
45 // Ask the effect to add its GUI
46 mLink->callDispatcher(effEditOpen, 0, 0, mHwnd, 0.0);
47
48 // Get the final bounds of the effect GUI
49 mLink->callDispatcher(effEditGetRect, 0, 0, &rect, 0.0);
50
51 // Add the effect host window to the layout
52 SetMinSize(wxSize(rect->right - rect->left, rect->bottom - rect->top));
53
54 // Must get the size again since SetPeer() could cause it to change
55 SetInitialSize(GetMinSize());
56
57 return true;
58}

Callers 2

BuildFancyMethod · 0.45

Calls 4

CreateFunction · 0.85
GetMinSizeFunction · 0.85
callDispatcherMethod · 0.80
wxSizeClass · 0.50

Tested by

no test coverage detected