Okay I am one step futher, but the widget is showed in a own window rather than in the preview frame.
This is the code I have:
HRESULT PreviewHandler::DoPreview()
{
HRESULT hr = E_FAIL;
if (previewWidget.isNull() && _pStream) // cannot call more than once (Unload should be called before another DoPreview)
{
previewWidget.reset(new PreviewWidget());
::SetParent((HWND)previewWidget->winId(), _hwndParent);
ShowWindow((HWND)previewWidget->winId(), SW_SHOW);
//previewWidget->show(); //Same effect
}
return hr;
}
HRESULT PreviewHandler::DoPreview()
{
HRESULT hr = E_FAIL;
if (previewWidget.isNull() && _pStream) // cannot call more than once (Unload should be called before another DoPreview)
{
previewWidget.reset(new PreviewWidget());
::SetParent((HWND)previewWidget->winId(), _hwndParent);
ShowWindow((HWND)previewWidget->winId(), SW_SHOW);
//previewWidget->show(); //Same effect
}
return hr;
}
To copy to clipboard, switch view to plain text mode
So how can I show the widget as child rather than in a own window?
Bookmarks