Changeset 501 in dev for trunk/ab5.0/abdev/abdev/abdev.cpp


Ignore:
Timestamp:
Apr 24, 2008, 1:03:58 PM (16 years ago)
Author:
dai_9181
Message:

いくつかのメニューをMainFrameに実装しなおした

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/abdev/abdev.cpp

    r500 r501  
    13301330    POINT pos;
    13311331    HDROP hDrop;
    1332     HGLOBAL hGlobal;
    13331332
    13341333    static COLORREF colorUser=RGB(255,255,255);
     
    13531352            switch(LOWORD(wParam)){
    13541353
    1355 #ifndef THETEXT
    1356 
    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 //THETEXT
    1443 
    1444 
    1445                 case IDM_TOPIC:
    1446 #ifdef THETEXT
    1447                     sprintf(str,"%sTopics\\index.html",pj_editor_Dir);
    1448                     ShellExecute(hwnd,"open",str,NULL,NULL,SW_SHOWNORMAL);
    1449 #else
    1450                     sprintf(str,"%sBasicHelp.chm",pj_editor_Dir);
    1451                     HtmlHelp(NULL,str,HH_DISPLAY_TOPIC,0);
    1452 #endif
    1453                     return 0;
    1454 
    1455 #ifdef THETEXT
    1456                 case IDM_DSHOMEPAGE:
    1457                     ShellExecute(hwnd,"open","http://www.discoversoft.net/",NULL,NULL,SW_SHOWNORMAL);
    1458                     return 0;
    1459 #else
    1460                 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 #endif
    1467 
    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 THETEXT
    1494                 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 #endif
    1504                 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 
    15291354
    15301355                ////////////////////////////////////////////////////
     
    15321357                ////////////////////////////////////////////////////
    15331358
    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;
    15951359
    15961360                case IDM_USER_COLOR:
     
    19411705            }
    19421706            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;
    20201707    }
    20211708
Note: See TracChangeset for help on using the changeset viewer.