version 1.2, 2010/01/21 03:00:21 |
version 1.5, 2013/08/07 01:53:40 |
Line 215 HCURSOR CWinfepDlg::OnQueryDragIcon() |
|
Line 215 HCURSOR CWinfepDlg::OnQueryDragIcon() |
|
void CWinfepDlg::OnSend() |
void CWinfepDlg::OnSend() |
{ |
{ |
// TODO: この位置にコントロール通知ハンドラ用のコードを追加してください |
// TODO: この位置にコントロール通知ハンドラ用のコードを追加してください |
if ( !infile ) return; |
int i; |
|
if ( !infile ) return; |
if ( currentline >= 0 && currentline < nlines ) { |
if ( currentline >= 0 && currentline < nlines ) { |
CString str; |
CString str; |
m_currentline.GetWindowText(str); |
m_currentline.GetWindowText(str); |
LPCSTR line = (LPCSTR)str; |
LPCSTR line = (LPCSTR)str; |
for ( int i = 0; line[i]; i++ ) { |
for ( i = 0; line[i] && isspace(line[i]); i++ ); |
if ( line[i] == '\t' ) |
if ( line[i] && |
::SendMessage(asirhwnd,WM_CHAR,' ',8); |
!strncmp(line+i,"end$",4) || !strncmp(line+i,"end;",4) ) return; |
else |
|
::SendMessage(asirhwnd,WM_CHAR,line[i],1); |
// for ( i = 0; line[i]; i++ ) { |
|
// if ( line[i] == '\t' ) |
|
// ::SendMessage(asirhwnd,WM_CHAR,' ',8); |
|
// else |
|
// ::SendMessage(asirhwnd,WM_CHAR,line[i],1); |
|
// } |
|
// ::SendMessage(asirhwnd,WM_CHAR,'\n',1); |
|
if ( line[i] ) { |
|
#if 0 |
|
m_currentline.SetSel(0,str.GetLength()); |
|
m_currentline.Copy(); |
|
#else |
|
int len=str.GetLength()+1; |
|
if (!::OpenClipboard(NULL) ) return; |
|
HGLOBAL hMem = ::GlobalAlloc(GMEM_FIXED,len); |
|
LPTSTR pMem = (LPTSTR)hMem; |
|
::lstrcpy(pMem,(LPCTSTR)line); |
|
::EmptyClipboard(); |
|
::SetClipboardData(CF_TEXT,hMem); |
|
::CloseClipboard(); |
|
#endif |
|
::SendMessage(asirhwnd,WM_CHAR,0x19,1); |
} |
} |
::SendMessage(asirhwnd,WM_CHAR,'\n',1); |
::SendMessage(asirhwnd,WM_CHAR,'\n',1); |
show_line(++currentline); |
show_line(++currentline); |
Line 284 void CWinfepDlg::OnAsir() |
|
Line 306 void CWinfepDlg::OnAsir() |
|
CFileDialog fileDialog(TRUE); |
CFileDialog fileDialog(TRUE); |
if ( fileDialog.DoModal() == IDOK ) { |
if ( fileDialog.DoModal() == IDOK ) { |
CString pathName = fileDialog.GetPathName(); |
CString pathName = fileDialog.GetPathName(); |
_spawnl(_P_NOWAIT,pathName,pathName,NULL); |
_spawnl(_P_NOWAIT,pathName,"asirgui",NULL); |
Sleep(5000); |
Sleep(5000); |
get_asirhwnd(); |
get_asirhwnd(); |
} |
} |