Digital Signal Processing Reference
In-Depth Information
CTestprojectDlg from the class name.) Select the Member Variables tab, and
then select IDC _ SLIDER1 from the list of control IDs.
8. Click the Add Variable button to display the Add Member Variable dialog.
Choose an appropriate member variable name, such as m _ slider , and make
sure that the Category field is Value and the Variable type field is int . Click
OK to return to the ClassWizard dialog window.
9. Create a new class for RTDX. Click on the Add Class button and select from
a type library . Browse in the folder c:\c6713\cc\bin and select (or type) the
file Rtdxint.dll . This pops up the Confirm classes dialog. Click OK to return
to the ClassWizard dialog. Click OK again to dismiss the ClassWizard dialog.
The new class IRtdxExp has been added for the functionality of RTDX.
10. From the ClassView pane (lower-left window):
(a) Select the class CTestprojectDlg . Right-click on the class and select Add
member variable . For variable type, use IRtdxExp* (note the pointer
notation), and for variable name use pRTDX (or another name). Click
OK to dismiss the dialog. This creates a pointer that represents and
manipulates the class IRtdxExp created in the previous step.
(b) Right-click on the class CTestprojectDlg and select Add Windows
Message Handler . This will bring up the New Windows Message dialog.
From the list, find and select the message WM _ DESTROY . Click on the
Add and Edit button to insert the new windows message. Add the fol-
lowing lines of code just after the function
CDialog: :OnDestroy( ).
if(pRTDX-> Close( ))
MessageBox( Could not close the channel!
≤ ≤
,
Error );
(c)
Right-click on the class CTestprojectDlg and choose the Add Windows
Message Handler to bring up again the New Windows Message dialog.
Select the WM _ HSCROLL message and click on the Add and Edit
button. Add the following lines of code just above the function
CDialog::OnHScroll(nSBCode,
nPos,
pScrollBar).
This is shown in
Figure 9.16.
long buffer;
UpdateData(TRUE);
pRTDX-> WriteI4((long)m_slider, &buffer);
UpdateData(FALSE);
(d) Select the class CTestprojectDlg and expand it. Locate the function
OnInitDialog( ) and double-click on it. Add the following lines of code
just above the return instruction:
Search WWH ::




Custom Search