0% found this document useful (0 votes)
18 views

Source Code: Float Void

The document contains source code for handling slider controls and graphing the results of slider position changes in real-time. It defines functions for responding to slider position changes to update variables, and a timer event handler that calls a graphing function to add data points to series on a chart control.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Source Code: Float Void

The document contains source code for handling slider controls and graphing the results of slider position changes in real-time. It defines functions for responding to slider position changes to update variables, and a timer event handler that calls a graphing function to add data points to series on a chart control.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Source Code

float wl_lama=0,wr_lama=0;
void
CbismillahinverseDlg::OnNMCustomdrawSlider1(NMHD
R *pNMHDR, LRESULT *pResult)
{

LPNMCUSTOMDRAW pNMCD =
reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR);
UpdateData(1);
m_V=m_slider1.GetPos();

V=m_slider1.GetPos();
teta=m_slider2.GetPos()/57.3;

UpdateData(0);
*pResult = 0;
}

void
CbismillahinverseDlg::OnNMCustomdrawSlider2(NMHD
R *pNMHDR, LRESULT *pResult)
{
LPNMCUSTOMDRAW pNMCD =
reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR);
UpdateData(1);
m_teta=m_slider2.GetPos();

V=m_slider1.GetPos();
teta=m_slider2.GetPos()/57.3;

UpdateData(0);
*pResult = 0;
}

void CbismillahinverseDlg::grafik(float V_i, float teta_i)


{
UpdateData(1);
wr=((1/R)*V_i)+((D/(R*2))*teta_i);
wl=((1/R)*V_i)-((D/(R*2))*teta_i);

m_wl=wl;
m_wr=wr;
UpdateData(0);

CSeries(m_chart.Series(0)).AddXY(n,wr_lama,NULL,RG
B(0,0,255));

CSeries(m_chart.Series(0)).AddXY(n,wr,NULL,RGB(0,0,
255));

CSeries(m_chart.Series(1)).AddXY(n,wl_lama,NULL,RG
B(0,0,255));

CSeries(m_chart.Series(1)).AddXY(n,wl,NULL,RGB(0,0,
255));

UpdateData(1);
wl_lama=wl;
wr_lama=wr;
UpdateData(0);
}
void CbismillahinverseDlg::OnTimer(UINT_PTR
nIDEvent)
{
grafik(V,teta);
UpdateData(1);
n++;
UpdateData(0);

}
void CbismillahinverseDlg::OnBnClickedButton1()
{
while(1){
}
}

Hasil Running Program

You might also like