Ignore:
Timestamp:
Mar 22, 2008, 9:47:59 PM (16 years ago)
Author:
dai_9181
Message:

・コンパイルビューへの出力を標準出力にも行うようにした。
#164への対応。コンパイルを中断すると高確率で強制終了してしまうバグを修正。
・ProjectEditorをVista用Microsoft SDKにてビルドできるようにした(WINVER定数を0x0501に指定した)。
#168への対応。エディタ上のDelegateキーワードを青色で表示するようにした。

File:
1 edited

Legend:

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

    r302 r455  
    8686#endif
    8787
     88
     89void CreateProcessWithStdHandle( const char *appPath, const char *cmdLine)
     90{
     91    std::string argsStr = (std::string)"\"" + appPath + "\" " + cmdLine;
     92    STARTUPINFO si;
     93    PROCESS_INFORMATION pi;
     94    memset(&si,0,sizeof(STARTUPINFO));
     95    si.cb=sizeof(STARTUPINFO);
     96    si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
     97    si.wShowWindow = SW_HIDE;
     98    si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
     99    si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
     100    si.hStdError = GetStdHandle(STD_ERROR_HANDLE);
     101   
     102    char args[8192];
     103    lstrcpy( args, argsStr.c_str() );
     104
     105    CreateProcess( NULL, args, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi );
     106}
    88107
    89108void ToBigChar(char str[]){
     
    12881307
    12891308    int width_SideWeb=0;
    1290     if(pobj_SideWeb->bShow){
    1291         width_SideWeb=pobj_nv->width_WebSearchView+LEVER_THICK;
     1309    if( pobj_SideWeb )
     1310    {
     1311        if(pobj_SideWeb->bShow){
     1312            width_SideWeb=pobj_nv->width_WebSearchView+LEVER_THICK;
     1313        }
    12921314    }
    12931315
     
    13231345        1);
    13241346
    1325     if(pobj_SideWeb->bShow){
    1326         //SideWeb
    1327         pobj_SideWeb->resize(
    1328             width_owner - pobj_nv->width_WebSearchView,
    1329             height_Rebar,
    1330             pobj_nv->width_WebSearchView,
    1331             height_MdiClient);
    1332     }
    1333     else pobj_SideWeb->resize(0,0,0,0);
     1347    if( pobj_SideWeb )
     1348    {
     1349        if(pobj_SideWeb->bShow){
     1350            //SideWeb
     1351            pobj_SideWeb->resize(
     1352                width_owner - pobj_nv->width_WebSearchView,
     1353                height_Rebar,
     1354                pobj_nv->width_WebSearchView,
     1355                height_MdiClient);
     1356        }
     1357        else pobj_SideWeb->resize(0,0,0,0);
     1358    }
    13341359
    13351360    if(width_pjv){
     
    14591484
    14601485        case WM_DRAWITEM:
    1461             DRAWITEMSTRUCT *pdis;
    1462             pdis=(DRAWITEMSTRUCT *)lParam;
    1463 
    1464             if(pdis->CtlType==ODT_MENU){
    1465                 if(!pobj_MainMenu) return 0;
    1466 
    1467                 CMenuItemData *pobj_MenuItemData;
    1468                 pobj_MenuItemData=(CMenuItemData *)pdis->itemData;
    1469                 if(pobj_MainMenu->hMenu==pobj_MenuItemData->pobj_ThisMenu->hMenu){
    1470                     //メインメニューの親アイテム
    1471                     pobj_MainMenu->OwnerDrawMenu(pdis->hDC,
    1472                         &pdis->rcItem,
    1473                         (pdis->itemState&ODS_SELECTED)!=0,
    1474                         pobj_MenuItemData->item_index);
     1486            {
     1487                DRAWITEMSTRUCT *pdis = (DRAWITEMSTRUCT *)lParam;
     1488
     1489                if(pdis->CtlType==ODT_MENU){
     1490                    if(!pobj_MainMenu) return 0;
     1491
     1492                    CMenuItemData *pobj_MenuItemData;
     1493                    pobj_MenuItemData=(CMenuItemData *)pdis->itemData;
     1494                    if(pobj_MainMenu->hMenu==pobj_MenuItemData->pobj_ThisMenu->hMenu){
     1495                        //メインメニューの親アイテム
     1496                        pobj_MainMenu->OwnerDrawMenu(pdis->hDC,
     1497                            &pdis->rcItem,
     1498                            (pdis->itemState&ODS_SELECTED)!=0,
     1499                            pobj_MenuItemData->item_index);
     1500                    }
     1501                    else{
     1502                        //メインメニューにぶらさがるサブメニュー
     1503                        pobj_MainMenu->OwnerDrawSubMenu(pobj_MenuItemData->pobj_ThisMenu->hMenu,
     1504                            pdis->hDC,
     1505                            &pdis->rcItem,
     1506                            (pdis->itemState&ODS_SELECTED)!=0,
     1507                            pobj_MenuItemData->item_index);
     1508                    }
    14751509                }
    1476                 else{
    1477                     //メインメニューにぶらさがるサブメニュー
    1478                     pobj_MainMenu->OwnerDrawSubMenu(pobj_MenuItemData->pobj_ThisMenu->hMenu,
    1479                         pdis->hDC,
    1480                         &pdis->rcItem,
    1481                         (pdis->itemState&ODS_SELECTED)!=0,
    1482                         pobj_MenuItemData->item_index);
    1483                 }
    1484             }
    1485             return 0;
     1510
     1511                return 0;
     1512            }
    14861513
    14871514        case WM_NOTIFY:
     
    20542081
    20552082                    sprintf(str,"%s%s",pj_editor_Dir,lpszCompilerName);
    2056                     ShellExecute(hwnd,"open",str,temporary,NULL,SW_SHOWNORMAL);
     2083
     2084                    CreateProcessWithStdHandle( str, temporary );
     2085
    20572086                    return 0;
    20582087                case IDM_DEBUGCOMPILE:
     
    21042133
    21052134                    sprintf(str,"%s%s",pj_editor_Dir,lpszCompilerName);
    2106                     ShellExecute(hwnd,"open",str,temporary,NULL,SW_SHOWNORMAL);
     2135
     2136                    CreateProcessWithStdHandle( str, temporary );
    21072137
    21082138                    return 0;
     
    21402170                        sprintf(str,"%s%s",pj_editor_Dir,WIN64_COMPILER_NAME);
    21412171
    2142                     ShellExecute(hwnd,"open",str,temporary,NULL,SW_SHOWNORMAL);
     2172                    CreateProcessWithStdHandle( str, temporary );
     2173
    21432174                    return 0;
    21442175                case IDM_RELEASECOMPILE:
     
    21902221
    21912222                    sprintf(str,"%s%s",pj_editor_Dir,lpszCompilerName);
    2192                     ShellExecute(hwnd,"open",str,temporary,NULL,SW_SHOWNORMAL);
     2223
     2224                    CreateProcessWithStdHandle( str, temporary );
     2225
    21932226                    return 0;
    21942227                case IDM_RELEASERUN:
     
    27212754            }
    27222755#endif
    2723             if(pobj_SideWeb->bShow){
    2724                 //SideWebとMDIクライアントの境目のサイズ変更ライン
    2725                 pobj_SideWeb->GetRect(&rect);
    2726                 ClientToScreen(hwnd,&rect);
    2727                 if(rect.top<=pos.y&&pos.y<=rect.bottom&&
    2728                     rect.left-LEVER_THICK<=pos.x&&pos.x<=rect.left){
    2729                     SetCursor(LoadCursor(0,IDC_SIZEWE));
     2756            if( pobj_SideWeb )
     2757            {
     2758                if(pobj_SideWeb->bShow){
     2759                    //SideWebとMDIクライアントの境目のサイズ変更ライン
     2760                    pobj_SideWeb->GetRect(&rect);
     2761                    ClientToScreen(hwnd,&rect);
     2762                    if(rect.top<=pos.y&&pos.y<=rect.bottom&&
     2763                        rect.left-LEVER_THICK<=pos.x&&pos.x<=rect.left){
     2764                        SetCursor(LoadCursor(0,IDC_SIZEWE));
     2765                    }
    27302766                }
    27312767            }
Note: See TracChangeset for help on using the changeset viewer.