- Timestamp:
- Apr 24, 2008, 1:03:58 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/abdev
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/abdev.cpp
r500 r501 1330 1330 POINT pos; 1331 1331 HDROP hDrop; 1332 HGLOBAL hGlobal;1333 1332 1334 1333 static COLORREF colorUser=RGB(255,255,255); … … 1353 1352 switch(LOWORD(wParam)){ 1354 1353 1355 #ifndef THETEXT1356 1357 1358 ////////////////////////1359 // デバッグ コマンド1360 ////////////////////////1361 1362 case IDM_STEP_IN:1363 pobj_Debugger->StepIn();1364 break;1365 case IDM_STEP_OVER:1366 pobj_Debugger->StepOver();1367 break;1368 case IDM_STEP_CURSOR:1369 pobj_Debugger->StepToCursor();1370 break;1371 case IDM_BREAKPOINT:1372 if(ProjectInfo.name[0]){1373 ProjectInfo.pobj_DBBreakPoint->Event_BreakPoint();1374 }1375 else{1376 pobj_DBBreakPoint->Event_BreakPoint();1377 }1378 break;1379 case IDM_DEBUG_STOP:1380 pobj_Debugger->DebugStop();1381 break;1382 case IDM_DEBUG_PAUSE:1383 pobj_Debugger->DebugPause();1384 break;1385 1386 1387 case IDM_COMMUNITY:1388 ShellExecute(hwnd,"open","iexplore.exe",1389 "http://www.activebasic.com/forum/",1390 NULL,SW_SHOWNORMAL);1391 return 0;1392 case IDM_COMMU_SEARCH:1393 ShellExecute(hwnd,"open","iexplore.exe",1394 "http://www.activebasic.com/forum/search.php",1395 NULL,SW_SHOWNORMAL);1396 return 0;1397 case IDM_COMMU_PM:1398 ShellExecute(hwnd,"open","iexplore.exe",1399 "http://www.activebasic.com/forum/privmsg.php?folder=inbox",1400 NULL,SW_SHOWNORMAL);1401 return 0;1402 case ID_COMMU_FORUM1:1403 ShellExecute(hwnd,"open","iexplore.exe",1404 "http://www.activebasic.com/forum/viewforum.php?f=1",1405 NULL,SW_SHOWNORMAL);1406 return 0;1407 case ID_COMMU_FORUM2:1408 ShellExecute(hwnd,"open","iexplore.exe",1409 "http://www.activebasic.com/forum/viewforum.php?f=2",1410 NULL,SW_SHOWNORMAL);1411 return 0;1412 case ID_COMMU_FORUM3:1413 ShellExecute(hwnd,"open","iexplore.exe",1414 "http://www.activebasic.com/forum/viewforum.php?f=5",1415 NULL,SW_SHOWNORMAL);1416 return 0;1417 case ID_COMMU_FORUM4:1418 ShellExecute(hwnd,"open","iexplore.exe",1419 "http://www.activebasic.com/forum/viewforum.php?f=3",1420 NULL,SW_SHOWNORMAL);1421 return 0;1422 case ID_COMMU_FORUM5:1423 ShellExecute(hwnd,"open","iexplore.exe",1424 "http://www.activebasic.com/forum/viewforum.php?f=6",1425 NULL,SW_SHOWNORMAL);1426 return 0;1427 case ID_COMMU_FORUM6:1428 ShellExecute(hwnd,"open","iexplore.exe",1429 "http://www.activebasic.com/forum/viewforum.php?f=8",1430 NULL,SW_SHOWNORMAL);1431 return 0;1432 case ID_COMMU_FORUM7:1433 ShellExecute(hwnd,"open","iexplore.exe",1434 "http://www.activebasic.com/forum/viewforum.php?f=4",1435 NULL,SW_SHOWNORMAL);1436 return 0;1437 case ID_COMMU_FORUM8:1438 ShellExecute(hwnd,"open","iexplore.exe",1439 "http://www.activebasic.com/forum/viewforum.php?f=7",1440 NULL,SW_SHOWNORMAL);1441 return 0;1442 #endif //THETEXT1443 1444 1445 case IDM_TOPIC:1446 #ifdef THETEXT1447 sprintf(str,"%sTopics\\index.html",pj_editor_Dir);1448 ShellExecute(hwnd,"open",str,NULL,NULL,SW_SHOWNORMAL);1449 #else1450 sprintf(str,"%sBasicHelp.chm",pj_editor_Dir);1451 HtmlHelp(NULL,str,HH_DISPLAY_TOPIC,0);1452 #endif1453 return 0;1454 1455 #ifdef THETEXT1456 case IDM_DSHOMEPAGE:1457 ShellExecute(hwnd,"open","http://www.discoversoft.net/",NULL,NULL,SW_SHOWNORMAL);1458 return 0;1459 #else1460 case IDM_AB_WEBSITE:1461 ShellExecute(hwnd,"open","http://www.activebasic.com/",NULL,NULL,SW_SHOWNORMAL);1462 return 0;1463 case IDM_ACTBDL:1464 ShellExecute(hwnd,"open","http://www.activebasic.com/activebasic5/download.htm",NULL,NULL,SW_SHOWNORMAL);1465 return 0;1466 #endif1467 1468 case IDM_ABOUT:1469 DialogBox(hResInst,MAKEINTRESOURCE(IDD_ABOUT),hwnd,(DLGPROC)DialogAbout);1470 return 0;1471 1472 case IDM_WEB_SEARCH:1473 hChild=GetWindow(hClient,GW_CHILD);1474 WndNum=GetWndNum(hChild);1475 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){1476 extern HWND hWebSearchCombo;1477 SendMessage(GetWindow(hWebSearchCombo,GW_CHILD),WM_CHAR,VK_RETURN,0);1478 }1479 return 0;1480 1481 1482 1483 //////////////////////////////////////////////////////1484 // レバーコントロールのサブメニューコマンド(レバー追加)1485 //////////////////////////////////////////////////////1486 1487 case IDM_DOCSELECTBAND:1488 pobj_Rebar->ChangeRebarBand(ID_DOCCOMBO);1489 return 0;1490 case IDM_STANDARDBAND:1491 pobj_Rebar->ChangeRebarBand(ID_STANDARDTOOLBAR);1492 return 0;1493 #ifndef THETEXT1494 case IDM_RELEASEBAND:1495 pobj_Rebar->ChangeRebarBand(ID_RELEASETOOLBAR);1496 return 0;1497 case IDM_DEBUGBAND:1498 pobj_Rebar->ChangeRebarBand(ID_DEBUGGERTOOLBAR);1499 return 0;1500 case IDM_SELECTCOMPILERBAND:1501 pobj_Rebar->ChangeRebarBand(ID_SELECTCOMPILERCOMBO);1502 return 0;1503 #endif1504 case IDM_BANDMENU_WEB_SEARCH:1505 pobj_Rebar->ChangeRebarBand(ID_WEB_SEARCH);1506 return 0;1507 case IDM_NOGRIPPER:1508 if(pobj_nv->bNoGripper) pobj_nv->bNoGripper=0;1509 else pobj_nv->bNoGripper=1;1510 1511 //レバーコントロールを再生成1512 pobj_Rebar->ResetRebar();1513 1514 //メニュー状態を設定1515 ResetState_DocMenu();1516 return 0;1517 case IDM_RESET_REBAR:1518 //"ツールバーの配置をすべて初期状態に戻します。\nよろしいですか?"1519 if(IDCANCEL==MessageBox(hwnd,STRING_TOOLBAR_RESET,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) break;1520 1521 //レバーコントロールを再生成1522 pobj_Rebar->ResetInitRebar();1523 1524 //メニュー状態を設定1525 ResetState_DocMenu();1526 return 0;1527 1528 1529 1354 1530 1355 //////////////////////////////////////////////////// … … 1532 1357 //////////////////////////////////////////////////// 1533 1358 1534 case IDM_ALLCLOSE_OMIT_MYSELF:1535 //このウィンドウ以外をすべて閉じる(&A)1536 hChild=GetWindow(hClient,GW_CHILD);1537 WndNum=GetWndNum(hChild);1538 for(i=0;i<MAX_WNDNUM;i++){1539 if(i==WndNum) continue;1540 if(MdiInfo[i].hwnd) SendMessage(MdiInfo[i].hwnd,WM_CLOSE,0,0);1541 }1542 return 0;1543 1544 case IDM_PATH_COPY:1545 hChild=GetWindow(hClient,GW_CHILD);1546 WndNum=GetWndNum(hChild);1547 1548 //絶対パスをコピー1549 hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE,lstrlen(MdiInfo[WndNum].path)+1);1550 pTemp=(char *)GlobalLock(hGlobal);1551 lstrcpy(pTemp,MdiInfo[WndNum].path);1552 GlobalUnlock(hGlobal);1553 1554 //クリップボードに保存1555 OpenClipboard(hwnd);1556 EmptyClipboard();1557 SetClipboardData(CF_TEXT,hGlobal);1558 CloseClipboard();1559 return 0;1560 1561 case IDM_FOLDER_OPEN:1562 hChild=GetWindow(hClient,GW_CHILD);1563 WndNum=GetWndNum(hChild);1564 1565 _splitpath(MdiInfo[WndNum].path,temporary,temp2,NULL,NULL);1566 lstrcat(temporary,temp2);1567 1568 ShellExecute(hwnd,"explore",temporary,NULL,NULL,SW_SHOWNORMAL);1569 return 0;1570 1571 case IDM_DELETE_FILE:1572 hChild=GetWindow(hClient,GW_CHILD);1573 WndNum=GetWndNum(hChild);1574 1575 _splitpath(MdiInfo[WndNum].path,NULL,NULL,temporary,temp2);1576 lstrcat(temporary,temp2);1577 1578 lstrcat(temporary," をごみ箱に移動して閉じます。よろしいですか?");1579 if(MessageBox(hwnd,temporary,APPLICATION_NAME,MB_OKCANCEL|MB_ICONQUESTION)==IDCANCEL) return 0;1580 1581 //ゴミ箱へ1582 SHFILEOPSTRUCT fo;1583 fo.hwnd=hwnd;1584 fo.wFunc=FO_DELETE;1585 fo.pFrom =MdiInfo[WndNum].path;1586 fo.pTo="\0";1587 fo.fFlags =FOF_ALLOWUNDO|FOF_NOCONFIRMATION;1588 SHFileOperation(&fo);1589 1590 //閉じる1591 MdiInfo[WndNum].pMdiTextEdit->UnModify();1592 SendMessage(MdiInfo[WndNum].hwnd,WM_CLOSE,0,0);1593 1594 return 0;1595 1359 1596 1360 case IDM_USER_COLOR: … … 1941 1705 } 1942 1706 break; //処理をDefFrameProcへ 1943 case WM_QUERYENDSESSION:1944 case WM_CLOSE:1945 extern BOOL bSearchingClasses;1946 if(bSearchingClasses){1947 pobj_ClassTreeView->bCloseSwitch=1;1948 return 0;1949 }1950 1951 //コンパイラビューを閉じる1952 if(hCompileView)1953 SendMessage(hCompileView,WM_COMMAND,IDCANCEL,0);1954 1955 //次回起動時にMDIウィンドウを最大化させるかを判定1956 hChild=GetWindow(hClient,GW_CHILD);1957 pobj_nv->bMDIZoomed=IsZoomed(hChild);1958 1959 //プロジェクトを閉じる1960 if(ProjectInfo.name[0]){1961 if(!CloseProject()) return 0;1962 }1963 1964 //MDIウィンドウの保存確認1965 hChild=GetWindow(hClient,GW_CHILD);1966 while(hChild){1967 i=GetWndNum(hChild);1968 if(!DocumentModifyCheck(hChild)) return 0;1969 hChild=GetNextWindow(hChild,GW_HWNDNEXT);1970 }1971 1972 1973 KillTimer(hwnd,ID_TIMER_BACKUP);1974 1975 1976 //ProjectViewの位置を保存、ProjectViewを破棄1977 GetWindowRect(hProjectView_ToolWindow,&pobj_nv->rectProjectView);1978 DestroyWindow(hProjectView);1979 DestroyWindow(hProjectView_ToolWindow);1980 1981 //Rebarの位置を保存、Rebarを破棄1982 delete pobj_Rebar;1983 pobj_Rebar=0;1984 1985 //タブコントロールを破棄1986 delete pobj_MainTab;1987 pobj_MainTab=0;1988 1989 //SideWebを破棄1990 delete pobj_SideWeb;1991 pobj_SideWeb=0;1992 1993 //メインウィンドウの最大化有無、座標を保存1994 if(IsZoomed(hwnd)) pobj_nv->bWindowMax=1;1995 else if(!IsIconic(hwnd)){1996 pobj_nv->bWindowMax=0;1997 GetWindowRect(hwnd,&pobj_nv->StartupWindowRect);1998 }1999 2000 hChild=GetWindow(hClient,GW_CHILD);2001 while(hChild){2002 CloseDocWindow(GetWndNum(hChild));2003 DestroyWindow(hChild);2004 hChild=GetWindow(hClient,GW_CHILD);2005 }2006 2007 EndProjectEditor(); //ProjectEditorの情報を保存2008 2009 //エディタ用フォントを破棄2010 extern HFONT hFont_TextEdit,hFont_HyperLink_TextEdit;2011 if(hFont_TextEdit) DeleteObject(hFont_TextEdit);2012 if(hFont_HyperLink_TextEdit) DeleteObject(hFont_HyperLink_TextEdit);2013 2014 DestroyWindow(hwnd);2015 return 0;2016 2017 case WM_DESTROY:2018 PostQuitMessage(0);2019 return 0;2020 1707 } 2021 1708 -
trunk/ab5.0/abdev/abdev/include/MainFrame.h
r500 r501 12 12 public: 13 13 14 // WebブラウザでURLを開く 15 void OpenWebBrowser( const std::string &url ); 16 17 // Explorerでパスを開く 18 void OpenExplorer( const std::string &path ); 19 14 20 // 生成された 15 21 ::LRESULT OnCreate( ::UINT msg, ::WPARAM wParam, ::LPARAM lParam, ::BOOL& handled ); 16 22 23 // OSが終了する 24 BOOL OnQueryEndSession(UINT nSource, UINT uLogOff); 25 17 26 // 「閉じる」ボタンがクリックされた 18 ::LRESULT OnClose( ::UINT msg, ::WPARAM wParam, ::LPARAM lParam, ::BOOL& handled);27 void OnClose(); 19 28 20 29 // リサイズされた … … 22 31 23 32 // 破棄された 24 ::LRESULT OnDestroy( ::UINT msg, ::WPARAM wParam, ::LPARAM lParam, ::BOOL& handled);33 void OnDestroy(); 25 34 26 35 // タイマーイベント … … 155 164 // 「リリース実行」メニューがクリックされた 156 165 void OnCmdReleaseRun( UINT uNotifyCode, int nID, CWindow wndCtl ); 166 167 // 「ステップイン」メニューがクリックされた 168 void OnCmdStepIn( UINT uNotifyCode, int nID, CWindow wndCtl ); 169 170 // 「ステップオーバー」メニューがクリックされた 171 void OnCmdStepOver( UINT uNotifyCode, int nID, CWindow wndCtl ); 172 173 // 「カーソル行まで実行」メニューがクリックされた 174 void OnCmdStepCursor( UINT uNotifyCode, int nID, CWindow wndCtl ); 175 176 // 「ブレークポイント」メニューがクリックされた 177 void OnCmdBreakPoint( UINT uNotifyCode, int nID, CWindow wndCtl ); 178 179 // 「デバッグの停止」メニューがクリックされた 180 void OnCmdDebugStop( UINT uNotifyCode, int nID, CWindow wndCtl ); 181 182 // 「デバッグの一時停止」メニューがクリックされた 183 void OnCmdDebugPause( UINT uNotifyCode, int nID, CWindow wndCtl ); 184 185 // Webリンクメニューがクリックされた 186 void OnCmdWebLink( UINT uNotifyCode, int nID, CWindow wndCtl ); 187 188 // 「トピックス」メニューがクリックされた 189 void OnCmdTopics( UINT uNotifyCode, int nID, CWindow wndCtl ); 190 191 // 「バージョン情報」メニューがクリックされた 192 void OnCmdAbout( UINT uNotifyCode, int nID, CWindow wndCtl ); 193 194 // レバーの「ドキュメントセレクト」メニューがクリックされた 195 void OnCmdDocSelectBand( UINT uNotifyCode, int nID, CWindow wndCtl ); 196 197 // レバーの「標準」メニューがクリックされた 198 void OnCmdStandardBand( UINT uNotifyCode, int nID, CWindow wndCtl ); 199 200 // レバーの「リリース」メニューがクリックされた 201 void OnCmdReleaseBand( UINT uNotifyCode, int nID, CWindow wndCtl ); 202 203 // レバーの「デバッグ」メニューがクリックされた 204 void OnCmdDebugBand( UINT uNotifyCode, int nID, CWindow wndCtl ); 205 206 // レバーの「プラットフォーム選択」メニューがクリックされた 207 void OnCmdSelectCompilerBand( UINT uNotifyCode, int nID, CWindow wndCtl ); 208 209 // レバーの「レバーを固定」メニューがクリックされた 210 void OnCmdNoGripper( UINT uNotifyCode, int nID, CWindow wndCtl ); 211 212 // レバーの「レバーをリセット」メニューがクリックされた 213 void OnCmdResetRebar( UINT uNotifyCode, int nID, CWindow wndCtl ); 214 215 // タブの「自分以外のウィンドウを閉じる」メニューがクリックされた 216 void OnCmdAllCloseOmitMyself( UINT uNotifyCode, int nID, CWindow wndCtl ); 217 218 // タブの「絶対パスをコピー」メニューがクリックされた 219 void OnCmdPathCopy( UINT uNotifyCode, int nID, CWindow wndCtl ); 220 221 // タブの「フォルダを開く」メニューがクリックされた 222 void OnCmdFolderOpen( UINT uNotifyCode, int nID, CWindow wndCtl ); 223 224 // タブの「ファイルを削除」メニューがクリックされた 225 void OnCmdDeleteFile( UINT uNotifyCode, int nID, CWindow wndCtl ); 157 226 158 227 private: … … 160 229 BEGIN_MSG_MAP( MainFrame ) 161 230 MESSAGE_HANDLER( WM_CREATE, OnCreate ) 162 MESSAGE_HANDLER( WM_CLOSE, OnClose ) 163 MESSAGE_HANDLER( WM_DESTROY, OnDestroy ) 231 MSG_WM_QUERYENDSESSION( OnQueryEndSession ) 232 MSG_WM_CLOSE( OnClose ) 233 MSG_WM_DESTROY( OnDestroy ) 164 234 MSG_WM_TIMER( OnTimer ) 165 235 MSG_WM_DRAWCLIPBOARD( OnDrawClipboard ) … … 222 292 #endif 223 293 COMMAND_ID_HANDLER_EX( IDM_SET, OnCmdSet ) 294 #ifndef THETEXT 224 295 COMMAND_ID_HANDLER_EX( IDM_DEBUG, OnCmdDebug ) 225 296 COMMAND_ID_HANDLER_EX( IDM_DEBUGCOMPILE, OnCmdDebugCompile ) … … 227 298 COMMAND_ID_HANDLER_EX( IDM_RELEASECOMPILE, OnCmdReleaseCompile ) 228 299 COMMAND_ID_HANDLER_EX( IDM_RELEASERUN, OnCmdReleaseRun ) 300 COMMAND_ID_HANDLER_EX( IDM_STEP_IN, OnCmdStepIn ) 301 COMMAND_ID_HANDLER_EX( IDM_STEP_OVER, OnCmdStepOver ) 302 COMMAND_ID_HANDLER_EX( IDM_STEP_CURSOR, OnCmdStepCursor ) 303 COMMAND_ID_HANDLER_EX( IDM_BREAKPOINT, OnCmdBreakPoint ) 304 COMMAND_ID_HANDLER_EX( IDM_DEBUG_STOP, OnCmdDebugStop ) 305 COMMAND_ID_HANDLER_EX( IDM_DEBUG_PAUSE, OnCmdDebugPause ) 306 COMMAND_ID_HANDLER_EX( IDM_COMMUNITY, OnCmdWebLink ) 307 COMMAND_ID_HANDLER_EX( IDM_COMMU_SEARCH, OnCmdWebLink ) 308 COMMAND_ID_HANDLER_EX( IDM_COMMU_PM, OnCmdWebLink ) 309 COMMAND_ID_HANDLER_EX( ID_COMMU_FORUM1, OnCmdWebLink ) 310 COMMAND_ID_HANDLER_EX( ID_COMMU_FORUM2, OnCmdWebLink ) 311 COMMAND_ID_HANDLER_EX( ID_COMMU_FORUM3, OnCmdWebLink ) 312 COMMAND_ID_HANDLER_EX( ID_COMMU_FORUM4, OnCmdWebLink ) 313 COMMAND_ID_HANDLER_EX( ID_COMMU_FORUM5, OnCmdWebLink ) 314 COMMAND_ID_HANDLER_EX( ID_COMMU_FORUM6, OnCmdWebLink ) 315 COMMAND_ID_HANDLER_EX( ID_COMMU_FORUM7, OnCmdWebLink ) 316 COMMAND_ID_HANDLER_EX( ID_COMMU_FORUM8, OnCmdWebLink ) 317 COMMAND_ID_HANDLER_EX( IDM_AB_WEBSITE, OnCmdWebLink ) 318 COMMAND_ID_HANDLER_EX( IDM_ACTBDL, OnCmdWebLink ) 319 #else 320 COMMAND_ID_HANDLER_EX( IDM_DSHOMEPAGE, OnCmdWebLink ) 321 #endif 322 COMMAND_ID_HANDLER_EX( IDM_TOPIC, OnCmdTopics ) 323 COMMAND_ID_HANDLER_EX( IDM_ABOUT, OnCmdAbout ) 324 COMMAND_ID_HANDLER_EX( IDM_DOCSELECTBAND, OnCmdDocSelectBand ) 325 COMMAND_ID_HANDLER_EX( IDM_STANDARDBAND, OnCmdStandardBand ) 326 #ifndef THETEXT 327 COMMAND_ID_HANDLER_EX( IDM_RELEASEBAND, OnCmdReleaseBand ) 328 COMMAND_ID_HANDLER_EX( IDM_DEBUGBAND, OnCmdDebugBand ) 329 COMMAND_ID_HANDLER_EX( IDM_SELECTCOMPILERBAND, OnCmdSelectCompilerBand ) 330 #endif 331 COMMAND_ID_HANDLER_EX( IDM_NOGRIPPER, OnCmdNoGripper ) 332 COMMAND_ID_HANDLER_EX( IDM_RESET_REBAR, OnCmdResetRebar ) 333 COMMAND_ID_HANDLER_EX( IDM_ALLCLOSE_OMIT_MYSELF, OnCmdAllCloseOmitMyself ) 334 COMMAND_ID_HANDLER_EX( IDM_PATH_COPY, OnCmdPathCopy ) 335 COMMAND_ID_HANDLER_EX( IDM_FOLDER_OPEN, OnCmdFolderOpen ) 336 COMMAND_ID_HANDLER_EX( IDM_DELETE_FILE, OnCmdDeleteFile ) 229 337 END_MSG_MAP() 230 338 }; -
trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
r500 r501 7 7 void SetupWindow(HWND hwnd); 8 8 void ResetTextEditFont(HWND hwnd); 9 10 void MainFrame::OpenWebBrowser( const std::string &url ) 11 { 12 ShellExecute(m_hWnd,"open",url.c_str(),"",NULL,SW_SHOWNORMAL); 13 } 14 15 void MainFrame::OpenExplorer( const std::string &path ) 16 { 17 ShellExecute(m_hWnd,"explore",path.c_str(),NULL,NULL,SW_SHOWNORMAL); 18 } 9 19 10 20 ::LRESULT MainFrame::OnCreate( ::UINT msg, ::WPARAM wParam, ::LPARAM lParam, ::BOOL& handled ) … … 51 61 } 52 62 53 ::LRESULT MainFrame::OnClose( ::UINT msg, ::WPARAM wParam, ::LPARAM lParam, ::BOOL& handled ) 54 { 63 BOOL MainFrame::OnQueryEndSession(UINT nSource, UINT uLogOff) 64 { 65 OnClose(); 66 67 return TRUE; 68 } 69 70 void MainFrame::OnClose() 71 { 72 extern BOOL bSearchingClasses; 73 if(bSearchingClasses){ 74 pobj_ClassTreeView->bCloseSwitch=1; 75 return; 76 } 77 78 //コンパイラビューを閉じる 79 extern HWND hCompileView; 80 if(hCompileView) 81 SendMessage(hCompileView,WM_COMMAND,IDCANCEL,0); 82 83 //次回起動時にMDIウィンドウを最大化させるかを判定 84 HWND hChild=::GetWindow(hClient,GW_CHILD); 85 pobj_nv->bMDIZoomed=::IsZoomed(hChild); 86 87 //プロジェクトを閉じる 88 if(ProjectInfo.name[0]){ 89 if(!CloseProject()) return; 90 } 91 92 //MDIウィンドウの保存確認 93 hChild=::GetWindow(hClient,GW_CHILD); 94 while(hChild){ 95 if(!DocumentModifyCheck(hChild)) return; 96 hChild=::GetNextWindow(hChild,GW_HWNDNEXT); 97 } 98 99 100 KillTimer(ID_TIMER_BACKUP); 101 102 103 //ProjectViewの位置を保存、ProjectViewを破棄 104 extern HWND hProjectView; 105 extern HWND hProjectView_ToolWindow; 106 ::GetWindowRect(hProjectView_ToolWindow,&pobj_nv->rectProjectView); 107 ::DestroyWindow(hProjectView); 108 ::DestroyWindow(hProjectView_ToolWindow); 109 110 //Rebarの位置を保存、Rebarを破棄 111 delete pobj_Rebar; 112 pobj_Rebar=0; 113 114 //タブコントロールを破棄 115 delete pobj_MainTab; 116 pobj_MainTab=0; 117 118 //SideWebを破棄 119 delete pobj_SideWeb; 120 pobj_SideWeb=0; 121 122 //メインウィンドウの最大化有無、座標を保存 123 if(IsZoomed()) pobj_nv->bWindowMax=1; 124 else if(!IsIconic()){ 125 pobj_nv->bWindowMax=0; 126 GetWindowRect(&pobj_nv->StartupWindowRect); 127 } 128 129 hChild=::GetWindow(hClient,GW_CHILD); 130 while(hChild){ 131 CloseDocWindow(GetWndNum(hChild)); 132 ::DestroyWindow(hChild); 133 hChild=::GetWindow(hClient,GW_CHILD); 134 } 135 136 EndProjectEditor(); //ProjectEditorの情報を保存 137 138 //エディタ用フォントを破棄 139 extern HFONT hFont_TextEdit,hFont_HyperLink_TextEdit; 140 if(hFont_TextEdit) DeleteObject(hFont_TextEdit); 141 if(hFont_HyperLink_TextEdit) DeleteObject(hFont_HyperLink_TextEdit); 142 55 143 DestroyWindow(); 56 return 0; 57 } 58 ::LRESULT MainFrame::OnDestroy( ::UINT msg, ::WPARAM wParam, ::LPARAM lParam, ::BOOL& handled ) 144 } 145 void MainFrame::OnDestroy() 59 146 { 60 147 mdiWindow->DestroyWindow(); … … 62 149 63 150 ::PostQuitMessage( 0 ); 64 65 return 0;66 151 } 67 152 … … 766 851 } 767 852 853 #ifndef THETEXT 768 854 void MainFrame::OnCmdDebug( UINT uNotifyCode, int nID, CWindow wndCtl ) 769 855 { … … 1052 1138 ShellExecute(m_hWnd,"open",temporary,NULL,NULL,SW_SHOWNORMAL); 1053 1139 } 1140 1141 void MainFrame::OnCmdStepIn( UINT uNotifyCode, int nID, CWindow wndCtl ) 1142 { 1143 pobj_Debugger->StepIn(); 1144 } 1145 1146 void MainFrame::OnCmdStepOver( UINT uNotifyCode, int nID, CWindow wndCtl ) 1147 { 1148 pobj_Debugger->StepOver(); 1149 } 1150 1151 void MainFrame::OnCmdStepCursor( UINT uNotifyCode, int nID, CWindow wndCtl ) 1152 { 1153 pobj_Debugger->StepToCursor(); 1154 } 1155 1156 void MainFrame::OnCmdBreakPoint( UINT uNotifyCode, int nID, CWindow wndCtl ) 1157 { 1158 if(ProjectInfo.name[0]){ 1159 ProjectInfo.pobj_DBBreakPoint->Event_BreakPoint(); 1160 } 1161 else{ 1162 extern CDBBreakPoint *pobj_DBBreakPoint; 1163 pobj_DBBreakPoint->Event_BreakPoint(); 1164 } 1165 } 1166 1167 void MainFrame::OnCmdDebugStop( UINT uNotifyCode, int nID, CWindow wndCtl ) 1168 { 1169 pobj_Debugger->DebugStop(); 1170 } 1171 1172 void MainFrame::OnCmdDebugPause( UINT uNotifyCode, int nID, CWindow wndCtl ) 1173 { 1174 pobj_Debugger->DebugPause(); 1175 } 1176 1177 #endif // not THETEXT 1178 1179 void MainFrame::OnCmdWebLink( UINT uNotifyCode, int nID, CWindow wndCtl ) 1180 { 1181 switch( nID ) 1182 { 1183 #ifndef THETEXT 1184 case IDM_COMMUNITY: 1185 OpenWebBrowser( "http://www.activebasic.com/forum/" ); 1186 break; 1187 case IDM_COMMU_SEARCH: 1188 OpenWebBrowser( "http://www.activebasic.com/forum/search.php" ); 1189 break; 1190 case IDM_COMMU_PM: 1191 OpenWebBrowser( "http://www.activebasic.com/forum/privmsg.php?folder=inbox" ); 1192 break; 1193 case ID_COMMU_FORUM1: 1194 OpenWebBrowser( "http://www.activebasic.com/forum/viewforum.php?f=1" ); 1195 break; 1196 case ID_COMMU_FORUM2: 1197 OpenWebBrowser( "http://www.activebasic.com/forum/viewforum.php?f=2" ); 1198 break; 1199 case ID_COMMU_FORUM3: 1200 OpenWebBrowser( "http://www.activebasic.com/forum/viewforum.php?f=5" ); 1201 break; 1202 case ID_COMMU_FORUM4: 1203 OpenWebBrowser( "http://www.activebasic.com/forum/viewforum.php?f=3" ); 1204 break; 1205 case ID_COMMU_FORUM5: 1206 OpenWebBrowser( "http://www.activebasic.com/forum/viewforum.php?f=6" ); 1207 break; 1208 case ID_COMMU_FORUM6: 1209 OpenWebBrowser( "http://www.activebasic.com/forum/viewforum.php?f=8" ); 1210 break; 1211 case ID_COMMU_FORUM7: 1212 OpenWebBrowser( "http://www.activebasic.com/forum/viewforum.php?f=4" ); 1213 break; 1214 case ID_COMMU_FORUM8: 1215 OpenWebBrowser( "http://www.activebasic.com/forum/viewforum.php?f=7" ); 1216 break; 1217 case IDM_AB_WEBSITE: 1218 OpenWebBrowser( "http://www.activebasic.com/" ); 1219 break; 1220 case IDM_ACTBDL: 1221 OpenWebBrowser( "http://www.activebasic.com/activebasic5/download.htm" ); 1222 break; 1223 #else 1224 case IDM_DSHOMEPAGE: 1225 OpenWebBrowser( "http://www.discoversoft.net/" ); 1226 break; 1227 #endif // not THETEXT 1228 default: 1229 throw; 1230 } 1231 } 1232 1233 void MainFrame::OnCmdTopics( UINT uNotifyCode, int nID, CWindow wndCtl ) 1234 { 1235 char temporary[1024]; 1236 #ifdef THETEXT 1237 sprintf(temporary,"%sTopics\\index.html",pj_editor_Dir); 1238 ShellExecute(m_hWnd,"open",temporary,NULL,NULL,SW_SHOWNORMAL); 1239 #else 1240 sprintf(temporary,"%sBasicHelp.chm",pj_editor_Dir); 1241 HtmlHelp(NULL,temporary,HH_DISPLAY_TOPIC,0); 1242 #endif 1243 } 1244 1245 void MainFrame::OnCmdAbout( UINT uNotifyCode, int nID, CWindow wndCtl ) 1246 { 1247 DialogBox(hResInst,MAKEINTRESOURCE(IDD_ABOUT),m_hWnd,(DLGPROC)DialogAbout); 1248 } 1249 1250 void MainFrame::OnCmdDocSelectBand( UINT uNotifyCode, int nID, CWindow wndCtl ) 1251 { 1252 pobj_Rebar->ChangeRebarBand(ID_DOCCOMBO); 1253 } 1254 1255 void MainFrame::OnCmdStandardBand( UINT uNotifyCode, int nID, CWindow wndCtl ) 1256 { 1257 pobj_Rebar->ChangeRebarBand(ID_STANDARDTOOLBAR); 1258 } 1259 1260 void MainFrame::OnCmdReleaseBand( UINT uNotifyCode, int nID, CWindow wndCtl ) 1261 { 1262 pobj_Rebar->ChangeRebarBand(ID_RELEASETOOLBAR); 1263 } 1264 1265 void MainFrame::OnCmdDebugBand( UINT uNotifyCode, int nID, CWindow wndCtl ) 1266 { 1267 pobj_Rebar->ChangeRebarBand(ID_DEBUGGERTOOLBAR); 1268 } 1269 1270 void MainFrame::OnCmdSelectCompilerBand( UINT uNotifyCode, int nID, CWindow wndCtl ) 1271 { 1272 pobj_Rebar->ChangeRebarBand(ID_SELECTCOMPILERCOMBO); 1273 } 1274 1275 void MainFrame::OnCmdNoGripper( UINT uNotifyCode, int nID, CWindow wndCtl ) 1276 { 1277 if(pobj_nv->bNoGripper) pobj_nv->bNoGripper=0; 1278 else pobj_nv->bNoGripper=1; 1279 1280 //レバーコントロールを再生成 1281 pobj_Rebar->ResetRebar(); 1282 1283 //メニュー状態を設定 1284 ResetState_DocMenu(); 1285 } 1286 1287 void MainFrame::OnCmdResetRebar( UINT uNotifyCode, int nID, CWindow wndCtl ) 1288 { 1289 //"ツールバーの配置をすべて初期状態に戻します。\nよろしいですか?" 1290 if( MessageBox(STRING_TOOLBAR_RESET,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION) == IDCANCEL ) 1291 { 1292 return; 1293 } 1294 1295 //レバーコントロールを再生成 1296 pobj_Rebar->ResetInitRebar(); 1297 1298 //メニュー状態を設定 1299 ResetState_DocMenu(); 1300 } 1301 1302 void MainFrame::OnCmdAllCloseOmitMyself( UINT uNotifyCode, int nID, CWindow wndCtl ) 1303 { 1304 //このウィンドウ以外をすべて閉じる(&A) 1305 HWND hChild=::GetWindow(hClient,GW_CHILD); 1306 int WndNum=GetWndNum(hChild); 1307 for(int i=0;i<MAX_WNDNUM;i++){ 1308 if(i==WndNum) continue; 1309 if(MdiInfo[i].hwnd) SendMessage(MdiInfo[i].hwnd,WM_CLOSE,0,0); 1310 } 1311 } 1312 1313 void MainFrame::OnCmdPathCopy( UINT uNotifyCode, int nID, CWindow wndCtl ) 1314 { 1315 HWND hChild=::GetWindow(hClient,GW_CHILD); 1316 int WndNum=GetWndNum(hChild); 1317 1318 //絶対パスをコピー 1319 HGLOBAL hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE,lstrlen(MdiInfo[WndNum].path)+1); 1320 char *pTemp=(char *)GlobalLock(hGlobal); 1321 lstrcpy(pTemp,MdiInfo[WndNum].path); 1322 GlobalUnlock(hGlobal); 1323 1324 //クリップボードに保存 1325 OpenClipboard(); 1326 EmptyClipboard(); 1327 SetClipboardData(CF_TEXT,hGlobal); 1328 CloseClipboard(); 1329 } 1330 1331 void MainFrame::OnCmdFolderOpen( UINT uNotifyCode, int nID, CWindow wndCtl ) 1332 { 1333 HWND hChild=::GetWindow(hClient,GW_CHILD); 1334 int WndNum=GetWndNum(hChild); 1335 1336 char temporary[1024], temp2[1024]; 1337 _splitpath(MdiInfo[WndNum].path,temporary,temp2,NULL,NULL); 1338 lstrcat(temporary,temp2); 1339 1340 OpenExplorer( temporary ); 1341 } 1342 1343 void MainFrame::OnCmdDeleteFile( UINT uNotifyCode, int nID, CWindow wndCtl ) 1344 { 1345 HWND hChild=::GetWindow(hClient,GW_CHILD); 1346 int WndNum=GetWndNum(hChild); 1347 1348 char temporary[1024], temp2[1024]; 1349 _splitpath(MdiInfo[WndNum].path,NULL,NULL,temporary,temp2); 1350 lstrcat(temporary,temp2); 1351 1352 lstrcat(temporary," をごみ箱に移動して閉じます。よろしいですか?"); 1353 if(MessageBox(temporary,APPLICATION_NAME,MB_OKCANCEL|MB_ICONQUESTION)==IDCANCEL) return; 1354 1355 //ゴミ箱へ 1356 SHFILEOPSTRUCT fo; 1357 fo.hwnd=m_hWnd; 1358 fo.wFunc=FO_DELETE; 1359 fo.pFrom =MdiInfo[WndNum].path; 1360 fo.pTo="\0"; 1361 fo.fFlags =FOF_ALLOWUNDO|FOF_NOCONFIRMATION; 1362 SHFileOperation(&fo); 1363 1364 //閉じる 1365 MdiInfo[WndNum].pMdiTextEdit->UnModify(); 1366 SendMessage(MdiInfo[WndNum].hwnd,WM_CLOSE,0,0); 1367 }
Note:
See TracChangeset
for help on using the changeset viewer.