2024年2月7日发(作者:)

}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)

END_MESSAGE_MAP()

// CAutoPlayDlg 对话框

CAutoPlayDlg::CAutoPlayDlg(CWnd* pParent /*=NULL*/)

: CDialogEx(CAutoPlayDlg::IDD, pParent)

{

m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);

}

void CAutoPlayDlg::DoDataExchange(CDataExchange* pDX)

{

CDialogEx::DoDataExchange(pDX);

DDX_Control(pDX, IDC_LIST2, m_list);

}

BEGIN_MESSAGE_MAP(CAutoPlayDlg, CDialogEx)

ON_WM_SYSCOMMAND()

ON_WM_PAINT()

ON_WM_QUERYDRAGICON()

ON_BN_CLICKED(IDC_BUTTON2, &CAutoPlayDlg::OnBnClickedButton2)

ON_BN_CLICKED(IDC_BUTTON1, &CAutoPlayDlg::OnBnClickedButton1)

ON_NOTIFY(NM_CLICK, IDC_LIST2, &CAutoPlayDlg::OnNMClickList2)

ON_BN_CLICKED(IDC_BUTTON3, &CAutoPlayDlg::OnBnClickedButton3)

END_MESSAGE_MAP()

int iNum = 0;

CString strAppPath = L"";

// CAutoPlayDlg 消息处理程序

HKEY OpenKey(HKEY hRootKey, wchar_t* strKey)

{

HKEY hKey;

LONG nError = RegOpenKeyEx(hRootKey, strKey, NULL, KEY_ALL_ACCESS, &hKey);

if (nError==ERROR_FILE_NOT_FOUND)

{

nError = RegCreateKeyEx(hRootKey, strKey, NULL, NULL, REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL, &hKey,NULL);

}

return hKey;

}

void SetVal(HKEY hKey, LPCTSTR lpValue, DWORD data)

{

LONG nError = RegSetValueEx(hKey, lpValue, NULL, REG_DWORD, (LPBYTE)&data, sizeof(DWORD));

}

DWORD GetVal(HKEY hKey, LPCTSTR lpValue)

{

DWORD data; DWORD size = sizeof(data); DWORD type = REG_DWORD;

LONG nError = RegQueryValueEx(hKey, lpValue, NULL, &type, (LPBYTE)&data, &size);

if (nError==ERROR_FILE_NOT_FOUND)

data = 0; // The value will be created and set to data next time SetVal() is called.

return data;

}

void NormalMessageVector ( CString str, vector * m_vecMessage)

{

if (m_vecMessage->size()>0)

{

m_vecMessage->clear();

}

int pos=0;

CString left1;

CString right1;

int charLength=gth();

for (int j=0;j

{

pos = ('|');

if (pos>0)

{

dlg.m_ile = new TCHAR[dlg.m_le];

memset(dlg.m_ile, 0, sizeof(TCHAR) * dlg.m_le);

vector vecDcmFile;

vector vecDcmImgPath;

CString strDcmFile;

if(l() != IDOK )

{

return ;

}

else

{

}

}

void CAutoPlayDlg::OnBnClickedButton1()

{

CString strStyNum = _T("");

CString strDiskNum = _T("");

if(iNum >=0 && iNum < m_mCount())

{

strStyNum = m_mText(iNum,2);

strDiskNum = m_mText(iNum,4);

}

else

{

strStyNum = m_mText(0,2);

strDiskNum = m_mText(0,4);

}

CString strPath = strAppPath + strDiskNum + "" + strStyNum;

//CFile file(_T("c:"),CFile::modeCreate|CFile::modeWrite);

//(fer(), gth() *sizeof(TCHAR));

//();

//HKEY key = NULL;

//HKEY key1 = NULL;

//if (ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE,_T("SoftwareZBSOFTMedBackUp"),0,KEY_WRITE|KEY_READ, &key))

//{

// int dateCount = 11;

// RegCreateKey(HKEY_LOCAL_MACHINE, _T("SoftwareZBSOFTMedBackUp"), &key);

//}

//RegSetValueEx(key,_T("diskNum"),NULL,REG_SZ,(LPBYTE)&strDiskNum, sizeof(strDiskNum));

//RegSetValueEx(key,_T("styNum"),NULL,REG_SZ,(LPBYTE)&strStyNum, sizeof(strStyNum));

//RegCloseKey(key);

//::ShellExecute(NULL, "open", pszPName, "参数1 参数2 参数3", NULL, SW_SHOW);

::ShellExecute(this->GetSafeHwnd(), _T("open"), strAppPath + L"IFC" + _T(""), strPath, NULL,SW_SHOWNORMAL);

//Sleep(200);

//USES_CONVERSION;

//CString v1,v2;

//CString callBackStr;

//callBackStr = strAppPath + strDiskNum + "" + strStyNum;

//CWnd * m_pWndReport= CWnd::FindWindow(_T("IFCTEST1"), NULL);

//if (m_pWndReport!=NULL)

//{

// //AfxGetMainWnd()->PostMessage(WM_ShowInfo,0/*(WPARAM)LOG_ERROR*/,(LPARAM)(LPCTSTR)L"findwindow'TMAINFORM',ok!");

// COPYDATASTRUCT cpd;

// = 0;

// = 2*gth() + 1;

// = (void*)fer();

// m_pWndReport->SendMessage(WM_COPYDATA, 0, (LPARAM)&cpd);

// //((CIFCCtrl*)GetParent())->CallBack(callBackStr);

// //AfxMessageBox(callBackStr);

// eBuffer();

//}

}

void CAutoPlayDlg::OnNMClickList2(NMHDR *pNMHDR, LRESULT *pResult)

{

LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast(pNMHDR);

// TODO: 在此添加控件通知处理程序代码

*pResult = 0;

DWORD dwPos = GetMessagePos();

CPoint point( LOWORD(dwPos), HIWORD(dwPos) );

m_ToClient(&point);