DlgPlots.cpp
上传用户:gnaf34
上传日期:2022-04-22
资源大小:1657k
文件大小:4k
- // DlgPlots.cpp : implementation file
- //
- #include "stdafx.h"
- #include "BeaconClient.h"
- #include "DlgPlots.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- extern CString currentTestFolder;
- extern CString SaveResult;
- /////////////////////////////////////////////////////////////////////////////
- // DlgPlots dialog
- DlgPlots::DlgPlots(CWnd* pParent /*=NULL*/)
- : CDialog(DlgPlots::IDD, pParent)
- {
- //{{AFX_DATA_INIT(DlgPlots)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void DlgPlots::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(DlgPlots)
- DDX_Control(pDX, IDC_IMAGE, m_image);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(DlgPlots, CDialog)
- //{{AFX_MSG_MAP(DlgPlots)
- ON_BN_CLICKED(IDC_LATENCY, OnLatency)
- ON_BN_CLICKED(IDC_PACKETLOSS, OnPacketloss)
- ON_BN_CLICKED(IDC_JITTER, OnJitter)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // DlgPlots message handlers
- void DlgPlots::OnLatency()
- {
- // TODO: Add your control notification handler code here
- //MessageBox("Latency");
- CString file;
- if(atoi(SaveResult)==1){
- file = currentTestFolder + "\Latency.bmp";
- }else {
- file = "Latency.bmp";
- }
- HBITMAP hGroupBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(),
- file,
- IMAGE_BITMAP,
- 480,360,
- LR_LOADFROMFILE);
- m_image.SetBitmap(hGroupBmp);
-
- }
- void DlgPlots::OnPacketloss()
- {
- // TODO: Add your control notification handler code here
- //MessageBox("Packet Loss");
-
- CString file;
- if(atoi(SaveResult)==1){
- file = currentTestFolder + "\PacketLoss.bmp";
- }else {
- file = "PacketLoss.bmp";
- }
- //CString file = currentTestFolder + "\PacketLoss.bmp";
- HBITMAP hGroupBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(),
- file,
- IMAGE_BITMAP,
- 480,360,
- LR_LOADFROMFILE);
- m_image.SetBitmap(hGroupBmp);
- }
- void DlgPlots::OnJitter()
- {
- // TODO: Add your control notification handler code here
- //MessageBox("Jitter");
- CString file;
- if(atoi(SaveResult)==1){
- file = currentTestFolder + "\AudioJitter.bmp";
- }else {
- file = "AudioJitter.bmp";
- }
- //CString file = currentTestFolder + "\AudioJitter.bmp";
- HBITMAP hGroupBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(),
- file,
- IMAGE_BITMAP,
- 480,360,
- LR_LOADFROMFILE);
- m_image.SetBitmap(hGroupBmp);
- }
- BOOL DlgPlots::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
-
- CString file;
- if(atoi(SaveResult)==1){
- file = currentTestFolder + "\Latency.bmp";
- }else {
- file = "Latency.bmp";
- }
- //CString file = currentTestFolder + "\Latency.bmp";
- HBITMAP hGroupBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(),
- file,
- IMAGE_BITMAP,
- 480,360,
- LR_LOADFROMFILE);
- m_image.SetBitmap(hGroupBmp);
-
- //GetDlgItem(IDC_LATENCY)->
- CheckRadioButton(IDC_LATENCY,IDC_JITTER,IDC_LATENCY);
- //DlgPlots::UpdateWindow();
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }