Thread: IPlug - Youlean
View Single Post
Old 08-28-2017, 02:36 AM   #151
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Hey Youlean,

i found out that resizing of VST2 does not properly work in WaveLab x64 and Audition x64.

You can fix this if you make 2 changes in your code:

IGraphicsWin.cpp: void IGraphicsWin::Resize(int w, int h)

Code:
// don't want to touch the host window in VST2/VST3/RTAS/AAX
          if((mPlug->GetAPI() != kAPIVST2) && (mPlug->GetAPI() != kAPIVST3) && (mPlug->GetAPI() != kAPIRTAS) && (mPlug->GetAPI() != kAPIAAX)) // TB28082017
          {
              if(pParent)
              {
                    SetWindowPos(pParent, 0, 0, 0, parentW + dw, parentH + dh, SETPOS_FLAGS);
              }

              if(pGrandparent)
              {
                    SetWindowPos(pGrandparent, 0, 0, 0, grandparentW + dw, grandparentH + dh, SETPOS_FLAGS);
              }
          }
In fact this remove the whole SetWindowsPos code for all parents. Resizing works now for VST2/VST3/RTAS and AAX!

IPlugVST.cpp:void IPlugVST::ResizeGraphics(int w, int h)

Code:
 IGraphics* pGraphics = GetGUI();

  if (pGraphics)
  {
    mEditRect.left = mEditRect.top = 0;
    mEditRect.right = w;
    mEditRect.bottom = h;
      
// Inform host about window resizing    
mHostCallback(&mAEffect, audioMasterSizeWindow, pGraphics->Width(), pGraphics->Height(), 0, 0.0f);

    OnWindowResize();

#ifdef USING_YCAIRO
    ResizeCairoSurface();
#endif
I hope this helps
__________________
www.tbproaudio.de
TBProAudio is online now   Reply With Quote