From 65092b7f63e129a416a32f0e0071547fba86d6d5 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 24 Feb 2004 03:37:12 +0000 Subject: "" svn path=/trunk/; revision=1355 --- externals/grill/vst/src/EditorWin.cpp | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'externals/grill/vst/src/EditorWin.cpp') diff --git a/externals/grill/vst/src/EditorWin.cpp b/externals/grill/vst/src/EditorWin.cpp index 5418ba80..9a79c391 100644 --- a/externals/grill/vst/src/EditorWin.cpp +++ b/externals/grill/vst/src/EditorWin.cpp @@ -11,17 +11,18 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "VstHost.h" #include +#include + #if FLEXT_OS == FLEXT_OS_WIN // only Windows code is situated in this file #include -#include - typedef std::map WndMap; static WndMap wndmap; static flext::ThrMutex mapmutex; +#define TIMER_INTERVAL 25 #define WCLNAME "vst~-class" @@ -118,16 +119,27 @@ static void threadfun(flext::thr_params *p) // plug->Dispatch(effEditTop,0,0, 0,0.0f); // printf("Dispatched to the top\n"); - SetTimer(wnd,0,25,NULL); + SetTimer(wnd,0,TIMER_INTERVAL,NULL); + + WINDOWINFO winfo; + winfo.cbSize = sizeof(winfo); + GetWindowInfo(wnd,&winfo); + TITLEBARINFO tinfo; + tinfo.cbSize = sizeof(tinfo); + GetTitleBarInfo(wnd,&tinfo); ERect r; plug->GetEditorRect(r); -// SetWindowPos(wnd,HWND_TOP,plug->getX(),plug->getY(),(r.right - r.left) + 6 , r.bottom - r.top + 26 , SWP_SHOWWINDOW); - SetWindowPos(wnd,HWND_TOP,r.left,r.top,(r.right - r.left) + 6 , r.bottom - r.top + 26 , SWP_SHOWWINDOW); - - // ShowWindow( SW_SHOW ); - // BringWindowToTop(wnd); - // SetFocus(); + SetWindowPos(wnd,HWND_TOP, + r.left, + r.top, + (r.right-r.left)+winfo.cxWindowBorders*2, + (r.bottom-r.top)+(tinfo.rcTitleBar.bottom-tinfo.rcTitleBar.top)+winfo.cyWindowBorders*2, + SWP_SHOWWINDOW + ); + + + // SetFocus(); // Message pump MSG msg; -- cgit v1.2.1