Home > Software engineering >  Vc in 2010 will be the figure in the MATLAB real-time display in the Vc
Vc in 2010 will be the figure in the MATLAB real-time display in the Vc

Time:10-29

I wrote in the MATLAB waveform analysis diagram of audio files is dynamic, now how to put it in VC, the image controls or other controls? Urgent need ah ~ trouble under the great god answer ~ thank you,

CodePudding user response:

http://www.ilovematlab.cn/thread-296281-1-1.html

CodePudding user response:

See: "matlab and c/c + + mixed programming"

CodePudding user response:

CodePudding user response:

Small white a ah, trouble can point in detail, now in use COM components

 CoInitialize (NULL); 
IDFTCOM * pImDFT;
Retrieves the hr=CoCreateInstance (CLSID_DFTCOM, NULL, CLSCTX_ALL, IID_IDFTCOM, (void * *) & amp; PImDFT);
COleVariant CTRL;
CTRL=0 (double);
PImDFT - & gt; Guitest1 (CTRL) (VARIANT); This newspaper called function too little
Guitest1 (lambda, CTRL);//call the COM components to produce an invisible Figure window this undefined guitest1 and lambda
Char FigName []="_guitest_";
HWND hFig=: : FindWindow (NULL, FigName);
Long lStyle=: : GetWindowLong (hFig GWL_STYLE);
: : SetWindowLong (hFig, GWL_STYLE lStyle& (~ WS_CAPTION) & amp; (~ WS_THICKFRAME));
: : SetWindowPos (hFig, NULL, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
The RECT PlotRec;
The CWnd * PlotArea=GetDlgItem (IDC_STATIC);
PlotArea - & gt; GetWindowRect (& amp; PlotRec);
The long Width=PlotRec. Right - PlotRec. Left;
Long Height=PlotRec. Bottom - PlotRec. Top;
: : SetParent (hFig PlotArea - & gt; GetSafeHwnd ());
: : SetWindowPos (hFig, NULL, 1, 1, Width, Height, SWP_NOZORDER | SWP_NOACTIVATE);
CTRL=(double) 1;
PImDFT - & gt; Guitest1 (CTRL) (VARIANT); This newspaper called function too little

Thank you will answer, their own learning, in a hurry with ~
  • Related