I found an easy solution. If you use windows, you can simply install the Matlab window. something like that.
HWND h = FindWindow(L"SunAwtFrame", L"Figure 1"); void MatlabViewerHack::EmbedMatlabPlot(HWND h) { SetWindowPos(h,NULL,rect.left(), rect.top(), rect.width(), rect.height(),0); SetWindowLong(h, GWL_STYLE,WS_CHILD|WS_VISIBLE); SetParent(h, parent_widget);
source share