1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-25 02:04:23 +00:00

Made the AU wrapper more robust against crashes when the UI and plugin are deleted in the wrong order.

This commit is contained in:
jules 2009-08-24 15:15:44 +00:00
parent 158a17f08a
commit 9ffd554aa3
3 changed files with 67 additions and 31 deletions

View file

@ -346,7 +346,7 @@ private:
case WM_WINDOWPOSCHANGING:
if ((((WINDOWPOS*) lParam)->flags & SWP_NOSIZE) == 0)
{
BrowserPluginHolderComponent* const comp = (BrowserPluginHolderComponent*) GetWindowLong (hWnd, GWL_USERDATA);
BrowserPluginHolderComponent* const comp = (BrowserPluginHolderComponent*) GetWindowLongPtr (hWnd, GWL_USERDATA);
comp->resizeToParentWindow();
}
break;
@ -383,14 +383,14 @@ public:
HWND ourHWND = (HWND) getWindowHandle();
SetParent (ourHWND, parentHWND);
DWORD val = GetWindowLong (ourHWND, GWL_STYLE);
DWORD val = GetWindowLongPtr (ourHWND, GWL_STYLE);
val = (val & ~WS_POPUP) | WS_CHILD;
SetWindowLong (ourHWND, GWL_STYLE, val);
SetWindowLongPtr (ourHWND, GWL_STYLE, val);
setVisible (true);
oldWinProc = SubclassWindow (parentHWND, (WNDPROC) interceptingWinProc);
SetWindowLong (parentHWND, GWL_USERDATA, (LONG) this);
SetWindowLongPtr (parentHWND, GWL_USERDATA, (LONG_PTR) this);
resizeToParentWindow();
}