LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static BOOL bNeedSave = FALSE ; static HINSTANCE hInst ; static HWND hwndEdit ; static int iOffset ; static TCHAR szFileName[MAX_PATH], szTitleName[MAX_PATH] ; static UINT messageFindReplace ; int iSelBeg, iSelEnd, iEnable ; LPFINDREPLACE pfr ; switch (message) { case WM_CREATE: hInst = ((LPCREATESTRUCT) lParam) -> hInstance ; // Create the edit control child window hwndEdit = CreateWindow (TEXT ("edit"), NULL, WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | WS_BORDER | ES_LEFT | ES_MULTILINE | ES_NOHIDESEL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0, 0, 0, 0, hwnd, (HMENU) EDITID, hInst, NULL) ; SendMessage (hwndEdit, EM_LIMITTEXT, 32000, 0L) ; // Initialize common dialog box stuff PopFileInitialize (hwnd) ; PopFontInitialize (hwndEdit) ; messageFindReplace = RegisterWindowMessage (FINDMSGSTRING) ; DoCaption (hwnd, szTitleName) ; return 0 ; case WM_SETFOCUS: SetFocus (hwndEdit) ; return 0 ; case WM_SIZE: MoveWindow (hwndEdit, 0, 0, LOWORD (lParam), HIWORD (lParam), TRUE) ; return 0 ; case WM_INITMENUPOPUP: switch (lParam) { case 1: // Edit menu // Enable Undo if edit control can do it EnableMenuItem ((HMENU) wParam, IDM_EDIT_UNDO, SendMessage (hwndEdit, EM_CANUNDO, 0, 0L) ? MF_ENABLED : MF_GRAYED) ; // Enable Paste if text is in the clipboard EnableMenuItem ((HMENU) wParam, IDM_EDIT_PASTE, IsClipboardFormatAvailable (CF_TEXT) ? MF_ENABLED : MF_GRAYED) ; // Enable Cut, Copy, and Del if text is selected SendMessage (hwndEdit, EM_GETSEL, (WPARAM) &iSelBeg, (LPARAM) &iSelEnd) ; iEnable = iSelBeg != iSelEnd ? MF_ENABLED : MF_GRAYED ; EnableMenuItem ((HMENU) wParam, IDM_EDIT_CUT, iEnable) ; EnableMenuItem ((HMENU) wParam, IDM_EDIT_COPY, iEnable) ; EnableMenuItem ((HMENU) wParam, IDM_EDIT_CLEAR, iEnable) ; break ; case 2: // Search menu // Enable Find, Next, and Replace if modeless // dialogs are not already active iEnable = hDlgModeless == NULL ? MF_ENABLED : MF_GRAYED ; EnableMenuItem ((HMENU) wParam, IDM_SEARCH_FIND, iEnable) ; EnableMenuItem ((HMENU) wParam, IDM_SEARCH_NEXT, iEnable) ; EnableMenuItem ((HMENU) wParam, IDM_SEARCH_REPLACE, iEnable) ; break ; } return 0 ; case WM_COMMAND: // Messages from edit control if (lParam && LOWORD (wParam) == EDITID) { switch (HIWORD (wParam)) { case EN_UPDATE : bNeedSave = TRUE ; return 0 ; case EN_ERRSPACE : case EN_MAXTEXT : MessageBox (hwnd, TEXT ("Edit control out of space."), szAppName, MB_OK | MB_ICONSTOP) ; return 0 ; } break ; } switch (LOWORD (wParam)) { // Messages from File menu case IDM_FILE_NEW: if (bNeedSave && IDCANCEL == AskAboutSave (hwnd, szTitleName)) return 0 ; SetWindowText (hwndEdit, TEXT ("\0")) ; szFileName[0] = '\0' ; szTitleName[0] = '\0' ; DoCaption (hwnd, szTitleName) ; bNeedSave = FALSE ; return 0 ; case IDM_FILE_OPEN: if (bNeedSave && IDCANCEL == AskAboutSave (hwnd, szTitleName)) return 0 ; if (PopFileOpenDlg (hwnd, szFileName, szTitleName)) { if (!PopFileRead (hwndEdit, szFileName)) { OkMessage (hwnd, TEXT ("Could not read file %s!"), szTitleName) ; szFileName[0] = '\0' ; szTitleName[0] = '\0' ; } } DoCaption (hwnd, szTitleName) ; bNeedSave = FALSE ; return 0 ; case IDM_FILE_SAVE: if (szFileName[0]) { if (PopFileWrite (hwndEdit, szFileName)) { bNeedSave = FALSE ; return 1 ; } else { OkMessage (hwnd, TEXT ("Could not write file %s"), szTitleName) ; return 0 ; } } // fall through case IDM_FILE_SAVE_AS: if (PopFileSaveDlg (hwnd, szFileName, szTitleName)) { DoCaption (hwnd, szTitleName) ; if (PopFileWrite (hwndEdit, szFileName)) { bNeedSave = FALSE ; return 1 ; } else { OkMessage (hwnd, TEXT ("Could not write file %s"), szTitleName) ; return 0 ; } } return 0 ; case IDM_FILE_PRINT: if (!PopPrntPrintFile (hInst, hwnd, hwndEdit, szTitleName)) OkMessage (hwnd, TEXT ("Could not print file %s"), szTitleName) ; return 0 ; case IDM_APP_EXIT: SendMessage (hwnd, WM_CLOSE, 0, 0) ; return 0 ; // Messages from Edit menu case IDM_EDIT_UNDO: SendMessage (hwndEdit, WM_UNDO, 0, 0) ; return 0 ; case IDM_EDIT_CUT: SendMessage (hwndEdit, WM_CUT, 0, 0) ; return 0 ; case IDM_EDIT_COPY: SendMessage (hwndEdit, WM_COPY, 0, 0) ; return 0 ; case IDM_EDIT_PASTE: SendMessage (hwndEdit, WM_PASTE, 0, 0) ; return 0 ; case IDM_EDIT_CLEAR: SendMessage (hwndEdit, WM_CLEAR, 0, 0) ; return 0 ; case IDM_EDIT_SELECT_ALL: SendMessage (hwndEdit, EM_SETSEL, 0, -1) ; return 0 ; // Messages from Search menu case IDM_SEARCH_FIND: SendMessage (hwndEdit, EM_GETSEL, 0, (LPARAM) &iOffset) ; hDlgModeless = PopFindFindDlg (hwnd) ; return 0 ; case IDM_SEARCH_NEXT: SendMessage (hwndEdit, EM_GETSEL, 0, (LPARAM) &iOffset) ; if (PopFindValidFind ()) PopFindNextText (hwndEdit, &iOffset) ; else hDlgModeless = PopFindFindDlg (hwnd) ; return 0 ; case IDM_SEARCH_REPLACE: SendMessage (hwndEdit, EM_GETSEL, 0, (LPARAM) &iOffset) ; hDlgModeless = PopFindReplaceDlg (hwnd) ; return 0 ; case IDM_FORMAT_FONT: if (PopFontChooseFont (hwnd)) PopFontSetFont (hwndEdit) ; return 0 ; // Messages from Help menu case IDM_HELP: OkMessage (hwnd, TEXT ("Help not yet implemented!"), TEXT ("\0")) ; return 0 ; case IDM_APP_ABOUT: DialogBox (hInst, TEXT ("AboutBox"), hwnd, AboutDlgProc) ; return 0 ; } break ; case WM_CLOSE: if (!bNeedSave || IDCANCEL != AskAboutSave (hwnd, szTitleName)) DestroyWindow (hwnd) ; return 0 ; case WM_QUERYENDSESSION : if (!bNeedSave || IDCANCEL != AskAboutSave (hwnd, szTitleName)) return 1 ; return 0 ; case WM_DESTROY: PopFontDeinitialize () ; PostQuitMessage (0) ; return 0 ; default: // Process "Find-Replace" messages if (message == messageFindReplace) { pfr = (LPFINDREPLACE) lParam ; if (pfr->Flags & FR_DIALOGTERM) hDlgModeless = NULL ; if (pfr->Flags & FR_FINDNEXT) if (!PopFindFindText (hwndEdit, &iOffset, pfr)) OkMessage (hwnd, TEXT ("Text not found!"), TEXT ("\0")) ; if (pfr->Flags & FR_REPLACE || pfr->Flags & FR_REPLACEALL) if (!PopFindReplaceText (hwndEdit, &iOffset, pfr)) OkMessage (hwnd, TEXT ("Text not found!"), TEXT ("\0")) ; if (pfr->Flags & FR_REPLACEALL) while (PopFindReplaceText (hwndEdit, &iOffset, pfr)) ; return 0 ; } break ; } return DefWindowProc (hwnd, message, wParam, lParam) ; }
/*! GREP実行 @date 2005.01.10 genta CEditView_Commandより移動 */ void CViewCommander::Command_GREP( void ) { CNativeW cmWork1; CNativeT cmWork2; CNativeT cmWork3; CNativeW cmWork4; cmWork1.SetString( GetEditWindow()->m_cDlgGrep.m_strText.c_str() ); cmWork2.SetString( GetEditWindow()->m_cDlgGrep.m_szFile ); cmWork3.SetString( GetEditWindow()->m_cDlgGrep.m_szFolder ); /* 今のEditViewにGrep結果を表示する。 Grepモードのとき、または未編集で無題かつアウトプットでない場合。 自ウィンドウがGrep実行中も、(異常終了するので)別ウィンドウにする */ if( ( CEditApp::getInstance()->m_pcGrepAgent->m_bGrepMode && !CEditApp::getInstance()->m_pcGrepAgent->m_bGrepRunning ) || ( !GetDocument()->m_cDocEditor.IsModified() && !GetDocument()->m_cDocFile.GetFilePathClass().IsValidPath() && /* 現在編集中のファイルのパス */ !CAppMode::getInstance()->IsDebugMode() ) ){ // 2011.01.23 Grepタイプ別適用 if( !GetDocument()->m_cDocEditor.IsModified() && GetDocument()->m_cDocLineMgr.GetLineCount() == 0 ){ CTypeConfig cTypeGrep = CDocTypeManager().GetDocumentTypeOfExt( _T("grepout") ); const STypeConfigMini* pConfig; CDocTypeManager().GetTypeConfigMini( cTypeGrep, &pConfig ); GetDocument()->m_cDocType.SetDocumentTypeIdx( pConfig->m_id ); GetDocument()->m_cDocType.LockDocumentType(); GetDocument()->OnChangeType(); } CEditApp::getInstance()->m_pcGrepAgent->DoGrep( m_pCommanderView, false, &cmWork1, &cmWork4, &cmWork2, &cmWork3, false, GetEditWindow()->m_cDlgGrep.m_bSubFolder, false, true, // Header GetEditWindow()->m_cDlgGrep.m_sSearchOption, GetEditWindow()->m_cDlgGrep.m_nGrepCharSet, GetEditWindow()->m_cDlgGrep.m_nGrepOutputLineType, GetEditWindow()->m_cDlgGrep.m_nGrepOutputStyle, GetEditWindow()->m_cDlgGrep.m_bGrepOutputFileOnly, GetEditWindow()->m_cDlgGrep.m_bGrepOutputBaseFolder, GetEditWindow()->m_cDlgGrep.m_bGrepSeparateFolder, false, false ); //プラグイン:DocumentOpenイベント実行 CPlug::Array plugs; CWSHIfObj::List params; CJackManager::getInstance()->GetUsablePlug( PP_DOCUMENT_OPEN, 0, &plugs ); for( CPlug::ArrayIter it = plugs.begin(); it != plugs.end(); it++ ){ (*it)->Invoke(&GetEditWindow()->GetActiveView(), params); } } else{ // 編集ウィンドウの上限チェック if( GetDllShareData().m_sNodes.m_nEditArrNum >= MAX_EDITWINDOWS ){ //最大値修正 //@@@ 2003.05.31 MIK OkMessage( m_pCommanderView->GetHwnd(), LS(STR_MAXWINDOW), MAX_EDITWINDOWS ); return; } /*======= Grepの実行 =============*/ /* Grep結果ウィンドウの表示 */ CControlTray::DoGrepCreateWindow(G_AppInstance(), m_pCommanderView->GetHwnd(), GetEditWindow()->m_cDlgGrep); } return; }
/*------------------------------------------------------------------------------------------------------------------ -- FUNCTION: Window_OnCommand -- -- DATE: November 12, 2013 -- -- REVISIONS: -- November 13, 2013 - Mat Siwoski: Completed implementation of the SendFile -- November 13, 2013 - Mat Siwoski: Implementation of the Config option. -- November 18, 2013 - Robin Hsieh: Added the enabling and disabling menu items. -- November 25, 2013 - Vincent Lau: Added creation of the Transmit thread after successful file read operation -- November 26, 2013 - Mat Siwoski: Added case for saving displayed text. -- November 27, 2013 - Robin Hsieh: Tested ErrorCheck in the file being read in. -- -- DESIGNER: Mat Siwoski -- -- PROGRAMMER: Mat Siwoski -- -- INTERFACE: void Window_OnCommand (HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) -- HWND hwnd: Handle to the window -- int id: The id of the selection. -- HWND hwndCtl: Handle to the control. -- UINT codeNotify: Int for the Notification -- -- RETURNS: - -- -- NOTES: -- This function deals with the selection in the menu on the main window. ------------------------------------------------------------------------------------------------------------------*/ void Window_OnCommand (HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) { static TCHAR szFileName[MAX_PATH], szTitleName[MAX_PATH] ; switch(id) { case IDM_CONNECT: EnableMenuItem(GetMenu(hwnd), IDM_CONNECT, MF_DISABLED); EnableMenuItem(GetMenu(hwnd), IDM_DISCONNECT, MF_ENABLED); DrawMenuBar(hwnd); break; case IDM_SENDFILE: DWORD dwTransmitThreadID; if (FileOpenDlg(hwnd, szFileName, szTitleName)) { if (!FileRead(hwnd, szFileName)) { // error file could not be read OkMessage (hwnd, TEXT ("Could not read file %s!"), szTitleName) ; szFileName[0] = '\0' ; szTitleName[0] = '\0' ; } else // success file read { // Clean up thread TerminateThread(hTransmitThread, 0); CloseHandle(hTransmitThread); ReleaseSemaphore(hFileWaitSemaphore, 1, NULL); // create transmit thread for this file hTransmitThread = CreateThread(NULL, 0, TransmitThread, pszFileText, 0, &dwTransmitThreadID); } } break; case IDM_SAVEFILE: if (FileSaveDlg(hwnd, szFileName, szTitleName)) { if (!FileSave(hwnd, szFileName)) { OkMessage(hwnd, TEXT ("Could not write file %s"), szTitleName) ; break; } } break; case IDM_DISCONNECT: EnableMenuItem(GetMenu(hwnd), IDM_CONNECT, MF_ENABLED); EnableMenuItem(GetMenu(hwnd), IDM_DISCONNECT, MF_DISABLED); DrawMenuBar(hwnd); break; case IDM_CONFIG: DWORD dwReceiveThreadID; TerminateThread(hReceiveThread, 0); CloseHandle(hReceiveThread); if(SetupPort(lpszCommName)) { if (ConfPort(&MainWindow, lpszCommName)) { // Set Read flag true bWantToRead = TRUE; hReceiveThread = CreateThread(NULL, 0, ReceiveThread, &hEdit, 0, &dwReceiveThreadID); break; } } break; case IDM_ABOUT: DialogBox (hInstance, TEXT ("AboutBox"), hwnd, AboutDlgProc) ; break; case IDM_EXIT: Window_OnDestroy(hwnd); break; } }
/*! GREP置換実行 */ void CViewCommander::Command_GREP_REPLACE( void ) { CNativeW cmWork1; CNativeT cmWork2; CNativeT cmWork3; CNativeW cmWork4; CDlgGrepReplace& cDlgGrepRep = GetEditWindow()->m_cDlgGrepReplace; cmWork1.SetString( cDlgGrepRep.m_strText.c_str() ); cmWork2.SetString( cDlgGrepRep.m_szFile ); cmWork3.SetString( cDlgGrepRep.m_szFolder ); cmWork4.SetString( cDlgGrepRep.m_strText2.c_str() ); /* 今のEditViewにGrep結果を表示する。 Grepモードのとき、または未編集で無題かつアウトプットでない場合。 自ウィンドウがGrep実行中も、(異常終了するので)別ウィンドウにする */ if( ( CEditApp::getInstance()->m_pcGrepAgent->m_bGrepMode && !CEditApp::getInstance()->m_pcGrepAgent->m_bGrepRunning ) || ( !GetDocument()->m_cDocEditor.IsModified() && !GetDocument()->m_cDocFile.GetFilePathClass().IsValidPath() && /* 現在編集中のファイルのパス */ !CAppMode::getInstance()->IsDebugMode() ) ){ CEditApp::getInstance()->m_pcGrepAgent->DoGrep( m_pCommanderView, true, &cmWork1, &cmWork4, &cmWork2, &cmWork3, false, cDlgGrepRep.m_bSubFolder, false, // Stdout true, // Header cDlgGrepRep.m_sSearchOption, cDlgGrepRep.m_nGrepCharSet, cDlgGrepRep.m_nGrepOutputLineType, cDlgGrepRep.m_nGrepOutputStyle, cDlgGrepRep.m_bGrepOutputFileOnly, cDlgGrepRep.m_bGrepOutputBaseFolder, cDlgGrepRep.m_bGrepSeparateFolder, cDlgGrepRep.m_bPaste, cDlgGrepRep.m_bBackup ); } else{ // 編集ウィンドウの上限チェック if( GetDllShareData().m_sNodes.m_nEditArrNum >= MAX_EDITWINDOWS ){ //最大値修正 //@@@ 2003.05.31 MIK OkMessage( m_pCommanderView->GetHwnd(), _T("編集ウィンドウ数の上限は%dです。\nこれ以上は同時に開けません。"), MAX_EDITWINDOWS ); return; } /*======= Grepの実行 =============*/ /* Grep結果ウィンドウの表示 */ cmWork1.Replace( L"\"", L"\"\"" ); cmWork2.Replace( _T("\""), _T("\"\"") ); cmWork3.Replace( _T("\""), _T("\"\"") ); cmWork4.Replace( L"\"", L"\"\"" ); // -GREPMODE -GKEY="1" -GREPR="2" -GFILE="*.*;*.c;*.h" -GFOLDER="c:\" -GCODE=0 -GOPT=S CNativeT cCmdLine; TCHAR szTemp[20]; cCmdLine.AppendString(_T("-GREPMODE -GKEY=\"")); cCmdLine.AppendStringW(cmWork1.GetStringPtr()); cCmdLine.AppendString(_T("\" -GREPR=\"")); cCmdLine.AppendStringW(cmWork4.GetStringPtr()); cCmdLine.AppendString(_T("\" -GFILE=\"")); cCmdLine.AppendString(cmWork2.GetStringPtr()); cCmdLine.AppendString(_T("\" -GFOLDER=\"")); cCmdLine.AppendString(cmWork3.GetStringPtr()); cCmdLine.AppendString(_T("\" -GCODE=")); auto_sprintf( szTemp, _T("%d"), cDlgGrepRep.m_nGrepCharSet ); cCmdLine.AppendString(szTemp); //GOPTオプション TCHAR pOpt[64]; pOpt[0] = _T('\0'); if( cDlgGrepRep.m_bSubFolder )_tcscat( pOpt, _T("S") ); // サブフォルダからも検索する if( cDlgGrepRep.m_sSearchOption.bWordOnly )_tcscat( pOpt, _T("W") ); // 単語単位で探す if( cDlgGrepRep.m_sSearchOption.bLoHiCase )_tcscat( pOpt, _T("L") ); // 英大文字と英小文字を区別する if( cDlgGrepRep.m_sSearchOption.bRegularExp )_tcscat( pOpt, _T("R") ); // 正規表現 if( cDlgGrepRep.m_nGrepOutputLineType == 1 )_tcscat( pOpt, _T("P") ); // 行を出力する // if( cDlgGrepRep.m_nGrepOutputLineType == 2 )_tcscat( pOpt, _T("N") ); // 否ヒット行を出力する 2014.09.23 if( 1 == cDlgGrepRep.m_nGrepOutputStyle )_tcscat( pOpt, _T("1") ); // Grep: 出力形式 if( 2 == cDlgGrepRep.m_nGrepOutputStyle )_tcscat( pOpt, _T("2") ); // Grep: 出力形式 if( 3 == cDlgGrepRep.m_nGrepOutputStyle )_tcscat( pOpt, _T("3") ); if( cDlgGrepRep.m_bGrepOutputFileOnly )_tcscat( pOpt, _T("F") ); if( cDlgGrepRep.m_bGrepOutputBaseFolder )_tcscat( pOpt, _T("B") ); if( cDlgGrepRep.m_bGrepSeparateFolder )_tcscat( pOpt, _T("D") ); if( cDlgGrepRep.m_bPaste )_tcscat( pOpt, _T("C") ); // クリップボードから貼り付け if( cDlgGrepRep.m_bBackup )_tcscat( pOpt, _T("O") ); // バックアップ作成 if( 0 < _tcslen( pOpt ) ){ cCmdLine.AppendString( _T(" -GOPT=") ); cCmdLine.AppendString( pOpt ); } SLoadInfo sLoadInfo; sLoadInfo.cFilePath = _T(""); sLoadInfo.eCharCode = CODE_NONE; sLoadInfo.bViewMode = false; CControlTray::OpenNewEditor( G_AppInstance(), m_pCommanderView->GetHwnd(), sLoadInfo, cCmdLine.GetStringPtr(), false, NULL, GetDllShareData().m_Common.m_sTabBar.m_bNewWindow? true : false ); } return; }
BOOL CDlgJump::OnBnClicked( int wID ) { switch( wID ){ case IDC_BUTTON_HELP: /* 「指定行へジャンプ」のヘルプ */ //Stonee, 2001/03/12 第四引数を、機能番号からヘルプトピック番号を調べるようにした MyWinHelp( GetHwnd(), HELP_CONTEXT, ::FuncID_To_HelpContextID(F_JUMP_DIALOG) ); // 2006.10.10 ryoji MyWinHelpに変更に変更 return TRUE; case IDC_CHECK_PLSQL: /* PL/SQLソースの有効行か */ if( BST_CHECKED == ::IsDlgButtonChecked( GetHwnd(), IDC_CHECK_PLSQL ) ){ ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_LABEL_PLSQL1 ), TRUE ); //Sept. 12, 2000 JEPRO ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_LABEL_PLSQL2 ), TRUE ); //Sept. 12, 2000 JEPRO ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_LABEL_PLSQL3 ), TRUE ); //Sept. 12, 2000 JEPRO ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_EDIT_PLSQL_E1 ), TRUE ); ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_SPIN_PLSQL_E1 ), TRUE ); //Oct. 6, 2000 JEPRO ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_COMBO_PLSQLBLOCKS ), TRUE ); m_pShareData->m_bLineNumIsCRLF_ForJump = true; ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_RADIO_LINENUM_LAYOUT ), FALSE ); ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_RADIO_LINENUM_CRLF ), FALSE ); }else{ ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_LABEL_PLSQL1 ), FALSE ); //Sept. 12, 2000 JEPRO ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_LABEL_PLSQL2 ), FALSE ); //Sept. 12, 2000 JEPRO ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_LABEL_PLSQL3 ), FALSE ); //Sept. 12, 2000 JEPRO ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_EDIT_PLSQL_E1 ), FALSE ); ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_SPIN_PLSQL_E1 ), FALSE ); //Oct. 6, 2000 JEPRO ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_COMBO_PLSQLBLOCKS ), FALSE ); ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_RADIO_LINENUM_LAYOUT ), TRUE ); ::EnableWindow( ::GetDlgItem( GetHwnd(), IDC_RADIO_LINENUM_CRLF ), TRUE ); } /* 行番号の表示 false=折り返し単位/true=改行単位 */ if( m_pShareData->m_bLineNumIsCRLF_ForJump ){ ::CheckDlgButton( GetHwnd(), IDC_RADIO_LINENUM_LAYOUT, FALSE ); ::CheckDlgButton( GetHwnd(), IDC_RADIO_LINENUM_CRLF, TRUE ); }else{ ::CheckDlgButton( GetHwnd(), IDC_RADIO_LINENUM_LAYOUT, TRUE ); ::CheckDlgButton( GetHwnd(), IDC_RADIO_LINENUM_CRLF, FALSE ); } return TRUE; case IDC_BUTTON_JUMP: /* 指定行へジャンプ */ //Feb. 20, 2001 JEPRO ボタン名を[IDOK]→[IDC_BUTTON_JUMP]に変更 /* ダイアログデータの取得 */ //From Here Feb. 20, 2001 JEPRO 次行をコメントアウト (CEditView_Command.cpp の Command_JUMP も関係しているので参照のこと) // ::EndDialog( GetHwnd(), GetData() ); // 次行から追加 if( 0 < GetData() ){ CloseDialog( 1 ); }else{ OkMessage( GetHwnd(), LS(STR_DLGJUMP1) ); } //To Here Feb. 20, 2001 { //@@@ 2002.2.2 YAZAKI 指定行へジャンプを、ダイアログを表示するコマンドと、実際にジャンプするコマンドに分離。 CEditDoc* pCEditDoc = (CEditDoc*)m_lParam; pCEditDoc->m_pcEditWnd->GetActiveView().GetCommander().HandleCommand(F_JUMP, true, 0, 0, 0, 0); // ジャンプコマンド発行 } return TRUE; case IDCANCEL: ::EndDialog( GetHwnd(), FALSE ); return TRUE; } /* 基底クラスメンバ */ return CDialog::OnBnClicked( wID ); }