Hi Jules,
I have a requirement where in I have to display Direct 3D Window inside a juce component. I Created a Direct 3D Window and made it child component of My component(which is derived from juce component). There are no resize/repaint issues.The problem is I am not able to get any mouse event callbacks…What am I doing wrong…Please help…
This is my code
juce::ComponentPeer* pCompPeer = (juce::ComponentPeer*) (getTopLevelComponent()->getPeer());
HWND parenthandle = (HWND)(pCompPeer->getNativeHandle());
if(parenthandle!=NULL)
{
bool result = SetParent(Direct3D_WindowHandle,parenthandle);
}
juce::Component::setBounds(x,y,width,height);
juce::Component *toplevelcomp = (getTopLevelComponent());
int newx=x,newy=y;
relativePositionToOtherComponent(toplevelcomp, newx, newy);
if(newx!=x && newy !=y)
{
SetWindowPos(m_hWnd,HWND_TOP,newx-x ,newy-y ,width,height, SWP_SHOWWINDOW);
}
setVisible(true);