Changeset 609 in dev


Ignore:
Timestamp:
May 18, 2008, 4:37:11 PM (15 years ago)
Author:
dai_9181
Message:

ProjectInfo構造体のpWindowInfoメンバをwindowInfosメンバに置き換えた。

Location:
trunk/ab5.0/abdev/abdev
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/abdev/Common.h

    r608 r609  
    160160#define TABCOLOR_BLUE       RGB(200,220,255)    //青
    161161#define TABCOLOR_YELLOW     RGB(255,255,180)    //黄色
    162 
    163 
    164 //////////////////////////////////////////
    165 // BasicCompiler、ProjectEditor共通の定数
    166 //////////////////////////////////////////
    167 
    168 //サイズ変更枠の太さ
    169 #define LEVER_THICK 5
    170 
    171 #define WM_SHOWERROR            WM_USER+70  //エラー表示メッセージ
    172 
    173 #define WM_SETCOMPILEVIEW       WM_USER+71  //コンパイラウィンドウが表示されたとき
    174 #define WM_DESTROYCOMPILEVIEW   WM_USER+72  //コンパイラウィンドウが破棄されたとき
    175 
    176 #define WM_SETDEBUGGERBASE      WM_USER+73  //デバッガベースウィンドウが表示されたとき
    177 #define WM_DESTROYDEBUGGERBASE  WM_USER+74  //デバッガベースウィンドウが破棄されたとき
    178 
    179 #define WM_SETDEBUGGERVIEW      WM_USER+75  //デバッガウィンドウが表示されたとき
    180 #define WM_DESTROYDEBUGGERVIEW  WM_USER+76  //デバッガウィンドウが表示されたとき
    181 
    182 ///////////////////////////////////////////
    183162
    184163
     
    614593    HTREEITEM hMenuTreeItem;
    615594
    616     int NumberOfWindows;
    617     WINDOW_INFO *pWindowInfo;
     595    std::vector<WINDOW_INFO> windowInfos;
    618596    HTREEITEM hWindowTreeItem;
    619597
     
    639617};
    640618extern PROJECTINFO ProjectInfo;
     619
     620extern ActiveBasic::IDE::ProjectManager projectManager;
    641621
    642622
     
    10941074//WindowControl.cpp
    10951075int GetWndInfoNum(char *name);
     1076WINDOW_INFO *GetWndInfo( char *name );
    10961077HGLOBAL Rad_GetChildInfoClipboardData(int WndNum,int WndInfoNum);
    10971078void Rad_PasteChildInfoClipboardData(int WndNum,HGLOBAL hGlobal);
     
    10991080void GetItemClassName(char *buffer,int Control);
    11001081void SaveWindowProgram();
    1101 void SaveWindowFile(char *path,WINDOW_INFO *WindowInfo,int NumberOfWindowInfo);
     1082void SaveWindowFile( char *path, const std::vector<WINDOW_INFO> &windowInfos );
    11021083_int8 OpenWindowFile(char *path);
    11031084void GetDefaultWindowFont(LOGFONT *LogFont);
  • trunk/ab5.0/abdev/abdev/FileOperation.cpp

    r475 r609  
    350350        if(ProjectInfo.ModifyOfMaterial){
    351351            sprintf(temporary,"%s%s.wnd",ProjectInfo.dir,ProjectInfo.name);
    352             SaveWindowFile(temporary,ProjectInfo.pWindowInfo,ProjectInfo.NumberOfWindows);
     352            SaveWindowFile( temporary, ProjectInfo.windowInfos );
    353353
    354354            //.wbpファイルを生成
  • trunk/ab5.0/abdev/abdev/MessageCallOperation.cpp

    r475 r609  
    2020    buffer[i]=0;
    2121    if(lstrcmp(EventName,"MenuClick")==0) return CT_MENU;
    22     for(i=0;i<ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++){
    23         if(lstrcmp(buffer,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].IdName)==0) break;
    24     }
    25     if(i==ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows) return 0;
    26 
    27     return ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control;
     22
     23    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     24    for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){
     25        if(lstrcmp(buffer,pWindowInfo->pChildInfo[i].IdName)==0) break;
     26    }
     27    if(i==pWindowInfo->NumberOfChildWindows) return 0;
     28
     29    return pWindowInfo->pChildInfo[i].Control;
    2830}
    2931char **GetProcedureNamesOfMessageCall(int WndInfoNum,ITEMEVENTINFO **ppItemEventInfo,int *num,BOOL *pbAlways){
     
    3335    char *buffer,**ppNames,temporary[MAX_PATH],temp2[MAX_PATH];
    3436
    35     NameLen=lstrlen(ProjectInfo.pWindowInfo[WndInfoNum].name);
    36     CallBackNameLen=lstrlen(ProjectInfo.pWindowInfo[WndInfoNum].CallBackName);
    37 
    38     sprintf(temporary,"%s%s",ProjectInfo.dir,ProjectInfo.pWindowInfo[WndInfoNum].filepath);
     37    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     38
     39    NameLen=lstrlen(pWindowInfo->name);
     40    CallBackNameLen=lstrlen(pWindowInfo->CallBackName);
     41
     42    sprintf(temporary,"%s%s",ProjectInfo.dir,pWindowInfo->filepath);
    3943    buffer=ReadBuffer(temporary);
    4044
     
    7276                strncpy(temporary,buffer+i2,NameLen);
    7377                temporary[NameLen]=0;
    74                 if(lstrcmp(temporary,ProjectInfo.pWindowInfo[WndInfoNum].name)==0&&buffer[i2+NameLen]=='_'){
     78                if(lstrcmp(temporary,pWindowInfo->name)==0&&buffer[i2+NameLen]=='_'){
    7579                    for(i2+=NameLen+1,i3=0;;i2++,i3++){
    7680                        if(!IsVariableChar(buffer[i2])){
     
    113117                i2+=9;
    114118                while(buffer[i2]==' '||buffer[i2]=='\t') i2++;
    115                 if(memicmp(buffer+i2,ProjectInfo.pWindowInfo[WndInfoNum].CallBackName,CallBackNameLen)==0&&
     119                if(memicmp(buffer+i2,pWindowInfo->CallBackName,CallBackNameLen)==0&&
    116120                    (buffer[i2+CallBackNameLen]==' '||buffer[i2+CallBackNameLen]=='\t'||buffer[i2+CallBackNameLen]=='(')){
    117121                    *pbAlways=1;
     
    132136    POINT pos;
    133137
    134     sprintf(temporary,"%s%s",ProjectInfo.dir,ProjectInfo.pWindowInfo[WndInfoNum].filepath);
     138    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     139
     140    sprintf(temporary,"%s%s",ProjectInfo.dir,pWindowInfo->filepath);
    135141    hChild=OpenFileWithExtension(temporary);
    136142    if(!hChild) return;
     
    217223    char temporary[MAX_PATH];
    218224
     225    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     226
    219227    MaxCount=ListView_GetItemCount(hList);
    220228    if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
     
    224232                    ListView_GetItemText(hList,i,0,temporary,MAX_PATH);
    225233                    sprintf(EventName,"%s_%s",
    226                         ProjectInfo.pWindowInfo[WndInfoNum].name,
     234                        pWindowInfo->name,
    227235                        temporary);
    228236                    break;
     
    263271                    ListView_GetItemText(hList,i,0,temporary,MAX_PATH);
    264272                    sprintf(EventName,"%s_%s_MenuClick",
    265                         ProjectInfo.pWindowInfo[WndInfoNum].name,
     273                        pWindowInfo->name,
    266274                        temporary);
    267275                    break;
     
    277285                    ListView_GetItemText(hList,i,0,temporary,MAX_PATH);
    278286                    sprintf(EventName,"%s_%s",
    279                         ProjectInfo.pWindowInfo[WndInfoNum].name,
     287                        pWindowInfo->name,
    280288                        temporary);
    281289                    break;
     
    292300                ListView_GetItemText(hList,i,0,temporary,MAX_PATH);
    293301                sprintf(EventName,"%s_%s_%s",
    294                     ProjectInfo.pWindowInfo[WndInfoNum].name,
    295                     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName,
     302                    pWindowInfo->name,
     303                    pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName,
    296304                    temporary);
    297305                break;
     
    300308        if(i==MaxCount) return 0;
    301309
    302         if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW){
     310        if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW){
    303311            //ListView
    304312            if(i==0) lstrcpy(Parameter,"ByRef nmListView As NMLISTVIEW");
     
    324332            else if(i==20) lstrcpy(Parameter,"ByRef nmLVDispInfo As NMLVDISPINFO");
    325333        }
    326         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR){
     334        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR){
    327335            //ProgressBar
    328336            lstrcpy(Parameter,"ByRef nmHdr As NMHDR");
    329337        }
    330         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR){
     338        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR){
    331339            //TrackBar
    332340            lstrcpy(Parameter,"ByRef nmHdr As NMHDR");
    333341        }
    334         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW){
     342        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW){
    335343            //TreeView
    336344            if(0<=i&&i<=7) lstrcpy(Parameter,"ByRef nmHdr As NMHDR");
    337345            else lstrcpy(Parameter,"ByRef nmTreeView As NMTREEVIEW");
    338346        }
    339         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN){
     347        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN){
    340348            //UpDown
    341349            if(i==0) lstrcpy(Parameter,"ByRef nmHdr As NMHDR");
     
    391399    extern MDIINFO MdiInfo[MAX_WNDNUM];
    392400    extern PROJECTINFO ProjectInfo;
    393     int i,i2,WndNum,WndInfoNum;
     401    int i,i2,WndNum;
    394402    HWND hList;
    395403
     
    399407
    400408    WndNum=GetWndNum(GetWindow(hClient,GW_CHILD));
    401     WndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path);
     409    WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
    402410    i=0;
    403411    if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
     
    437445            //メニュー イベント
    438446            SendDlgItemMessage(hDlg,IDC_MENU,BM_SETCHECK,BST_CHECKED,0);
    439             if(ProjectInfo.pWindowInfo[WndInfoNum].MenuID){
     447            if(pWindowInfo->MenuID){
    440448                int MenuInfoNum;
    441                 MenuInfoNum=GetMenuInfoNum(ProjectInfo.pWindowInfo[WndInfoNum].MenuID);
     449                MenuInfoNum=GetMenuInfoNum(pWindowInfo->MenuID);
    442450                i=0;
    443451                i2=0;
     
    456464        EnableWindow(GetDlgItem(hDlg,IDC_MMSYS),0);
    457465        SendDlgItemMessage(hDlg,IDC_DEFAULT,BM_SETCHECK,BST_CHECKED,0);
    458         if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON){
     466        if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON){
    459467            //Button
    460468            InsertEventToList(hList,i++,"Click","BN_CLICKED","ボタンがクリックされた時");
    461469            InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","ボタンがダブル クリックされた時");
    462470        }
    463         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX){
     471        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX){
    464472            //CheckBox
    465473            InsertEventToList(hList,i++,"Click","BN_CLICKED","チェック ボックスがクリックされた時");
    466474            InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","チェック ボックスがダブル クリックされた時");
    467475        }
    468         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX){
     476        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX){
    469477            //ComboBox
    470478            InsertEventToList(hList,i++,"CloseUp","CBN_CLOSEUP","リスト ボックスが非表示になる時");
     
    480488            InsertEventToList(hList,i++,"SetFocus","CBN_SETFOCUS","入力フォーカスを取得した時");
    481489        }
    482         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT){
     490        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT){
    483491            //Edit
    484492            InsertEventToList(hList,i++,"Change","EN_CHANGE","エディット ボックスの内容が変更された時(後処理)");
     
    491499            InsertEventToList(hList,i++,"VScroll","EN_VSCROLL","垂直スクロールを行った時");
    492500        }
    493         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX){
     501        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX){
    494502            //ImageBox
    495503            InsertEventToList(hList,i++,"Click","STN_CLICKED","イメージ ボックスがクリックされた時");
    496504            InsertEventToList(hList,i++,"DblClick","STN_DBLCLK","イメージ ボックスがダブル クリックされた時");
    497505        }
    498         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX){
     506        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX){
    499507            //ListBox
    500508            InsertEventToList(hList,i++,"SelChange","LBN_SELCHANGE","リスト内の選択が変更された時");
     
    505513            InsertEventToList(hList,i++,"SetFocus","LBN_SETFOCUS","入力フォーカスを取得した時");
    506514        }
    507         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW){
     515        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW){
    508516            //ListView
    509517            i=SetDefaultNotifyMessagesInList(hList,CT_LISTVIEW);
    510518        }
    511         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR){
     519        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR){
    512520            //ProgressBar
    513521            InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","メモリ不足でコントロールの動作が完了できない時");
    514522        }
    515         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON){
     523        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON){
    516524            //RadioButton
    517525            InsertEventToList(hList,i++,"Click","BN_CLICKED","ラジオ ボタンがクリックされた時");
    518526            InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","ラジオ ボタンがダブル クリックされた時");
    519527        }
    520         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){
     528        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){
    521529            //Static
    522530            InsertEventToList(hList,i++,"Click","STN_CLICKED","スタティック テキストがクリックされた時");
    523531            InsertEventToList(hList,i++,"DblClick","STN_DBLCLK","スタティック テキストがダブル クリックされた時");
    524532        }
    525         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR){
     533        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR){
    526534            //TrackBar
    527535            InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","メモリ不足でコントロールの動作が完了できない時");
     
    529537            InsertEventToList(hList,i++,"CustomDraw","NM_CUSTOMDRAW ","カスタム描画操作の通知");
    530538        }
    531         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW){
     539        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW){
    532540            //TreeView
    533541            i=SetDefaultNotifyMessagesInList(hList,CT_TREEVIEW);
    534542        }
    535         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN){
     543        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN){
    536544            //UpDown
    537545            InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","メモリ不足でコントロールの動作が完了できない時");
     
    643651            SetWindowLongPtr(GetDlgItem(hwnd,IDC_EVENTLIST),GWLP_WNDPROC,(long)EventListViewProc);
    644652
    645             WndNum=GetWndNum(GetWindow(hClient,GW_CHILD));
    646             WndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path);
    647             NowMenuNum=GetMenuInfoNum(ProjectInfo.pWindowInfo[WndInfoNum].MenuID);
     653            {
     654                WndNum=GetWndNum(GetWindow(hClient,GW_CHILD));
     655                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
     656                NowMenuNum=GetMenuInfoNum(pWindowInfo->MenuID);
     657            }
    648658            break;
    649659        case WM_COMMAND:
  • trunk/ab5.0/abdev/abdev/ProjectControl.cpp

    r608 r609  
    180180                case IDM_MATERIALTREE_OPEN:
    181181                    hTreeItem=TreeView_GetSelection(hMaterialTreeView);
    182                     for(i=0;i<ProjectInfo.NumberOfWindows;i++){
    183                         if(ProjectInfo.pWindowInfo[i].hTreeItem==hTreeItem){
     182                    for(i=0;i<static_cast<int>(ProjectInfo.windowInfos.size());i++){
     183                        if(ProjectInfo.windowInfos[i].hTreeItem==hTreeItem){
    184184                            NewRadWindow(i);
    185185                            break;
     
    247247                        }
    248248                    }
    249                     for(i=0;i<ProjectInfo.NumberOfWindows;i++){
    250                         if(ProjectInfo.pWindowInfo[i].hTreeItem==hTreeItem){
     249                    for(i=0;i<static_cast<int>(ProjectInfo.windowInfos.size());i++){
     250                        if(ProjectInfo.windowInfos[i].hTreeItem==hTreeItem){
    251251
    252252                            //"%s ウィンドウをプロジェクトから削除します。よろしいですか?"
    253                             sprintf(str,STRING_PJ_CHECK_DELETEWINDOW,ProjectInfo.pWindowInfo[i].name);
     253                            sprintf(str,STRING_PJ_CHECK_DELETEWINDOW,ProjectInfo.windowInfos[i].name);
    254254                            if(IDCANCEL==MessageBox(hOwner,str,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) break;
    255255
     
    10581058        // ウィンドウ定義ファイル(*.wnd)を作成
    10591059        /////////////////////////////////////////
    1060         WINDOW_INFO WindowInfo[1];
    1061         WindowInfo[0].name="MainWnd";
    1062         WindowInfo[0].HandleName="hMainWnd";
    1063         WindowInfo[0].pos.x=CW_USEDEFAULT;
    1064         WindowInfo[0].pos.y=CW_USEDEFAULT;
    1065         WindowInfo[0].size.cx=480;
    1066         WindowInfo[0].size.cy=360;
    1067         WindowInfo[0].caption=NewProjectInfo.name;
     1060        std::vector<WINDOW_INFO> windowInfos;
     1061        windowInfos.push_back( WINDOW_INFO() );
     1062        windowInfos.back().name="MainWnd";
     1063        windowInfos.back().HandleName="hMainWnd";
     1064        windowInfos.back().pos.x=CW_USEDEFAULT;
     1065        windowInfos.back().pos.y=CW_USEDEFAULT;
     1066        windowInfos.back().size.cx=480;
     1067        windowInfos.back().size.cy=360;
     1068        windowInfos.back().caption=NewProjectInfo.name;
    10681069        if(NewProjectInfo.dwTypeID==IDC_EXE_WINDOWBASE)
    1069             WindowInfo[0].style=WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_VISIBLE;
     1070            windowInfos.back().style=WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_VISIBLE;
    10701071        else if(NewProjectInfo.dwTypeID==IDC_EXE_DIRECTX)
    1071             WindowInfo[0].style=WS_OVERLAPPED|WS_THICKFRAME|WS_SYSMENU;
    1072         WindowInfo[0].ExStyle=0;
    1073         WindowInfo[0].MenuID=0;
    1074         WindowInfo[0].id=0;
    1075         WindowInfo[0].bgColor=COLOR_3DFACE;
    1076         GetDefaultWindowFont(&WindowInfo[0].LogFont);
    1077         WindowInfo[0].IconResName=0;
    1078         WindowInfo[0].ClassName="NORMAL";
    1079         WindowInfo[0].CallBackName="MainWndProc";
    1080         WindowInfo[0].type=WNDTYPE_DEFAULT;
    1081         WindowInfo[0].filepath="MainWnd.ab";
    1082         WindowInfo[0].NumberOfChildWindows=0;
     1072            windowInfos.back().style=WS_OVERLAPPED|WS_THICKFRAME|WS_SYSMENU;
     1073        windowInfos.back().ExStyle=0;
     1074        windowInfos.back().MenuID=0;
     1075        windowInfos.back().id=0;
     1076        windowInfos.back().bgColor=COLOR_3DFACE;
     1077        GetDefaultWindowFont(&windowInfos.back().LogFont);
     1078        windowInfos.back().IconResName=0;
     1079        windowInfos.back().ClassName="NORMAL";
     1080        windowInfos.back().CallBackName="MainWndProc";
     1081        windowInfos.back().type=WNDTYPE_DEFAULT;
     1082        windowInfos.back().filepath="MainWnd.ab";
     1083        windowInfos.back().NumberOfChildWindows=0;
    10831084        sprintf(temporary,"%s%s.wnd",dir,NewProjectInfo.name);
    10841085
    10851086        ProjectInfo.NumberOfMenu=0;
    1086         SaveWindowFile(temporary,WindowInfo,1);
     1087        SaveWindowFile( temporary, windowInfos );
    10871088    }
    10881089
     
    12091210    tv.hParent=TreeView_InsertItem(hMaterialTreeView,&tv);
    12101211    ProjectInfo.hWindowTreeItem=tv.hParent;
    1211     for(i=0;i<ProjectInfo.NumberOfWindows;i++){
     1212    BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos )
     1213    {
    12121214        tv.item.iImage=2;
    12131215        tv.item.iSelectedImage=2;
    1214         tv.item.pszText=ProjectInfo.pWindowInfo[i].name;
    1215         ProjectInfo.pWindowInfo[i].hTreeItem=TreeView_InsertItem(hMaterialTreeView,&tv);
     1216        tv.item.pszText = windowInfo.name;
     1217        windowInfo.hTreeItem=TreeView_InsertItem(hMaterialTreeView,&tv);
    12161218    }
    12171219}
     
    12531255    //解析
    12541256    ProjectInfo.pobj_DBFileInfo=new CDBFileInfo();
     1257    bool isUseWindow = false;
    12551258    for(i=0;;i++){
    12561259        if(buffer[i]=='\0') break;
     
    13241327                    temporary[i2]=buffer[i];
    13251328                }
    1326                 ProjectInfo.NumberOfWindows=atoi(temporary);
     1329                if( atoi(temporary) > 0 )
     1330                {
     1331                    isUseWindow = true;
     1332                }
    13271333            }
    13281334            else if(lstrcmpi(temporary,"OPTION")==0&&buffer[i]=='='){
     
    14501456
    14511457
    1452     if(ProjectInfo.NumberOfWindows){
     1458    if( isUseWindow )
     1459    {
    14531460        /////////////////////////////////////////////
    14541461        //ウィンドウ定義ファイル(*.wnd)をオープン
     
    14571464    }
    14581465    else{
    1459         ProjectInfo.pWindowInfo=(WINDOW_INFO *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1);
     1466        ProjectInfo.windowInfos.clear();
    14601467
    14611468        ProjectInfo.NumberOfMenu=0;
     
    15811588                        }
    15821589                        else if(lstrcmpi(temporary,"rad")==0){
    1583                             for(i3=0;i3<ProjectInfo.NumberOfWindows;i3++){
    1584                                 if(lstrcmpi(ProjectInfo.pWindowInfo[i3].name,temp2)==0){
     1590                            for(i3=0;i3<static_cast<int>(ProjectInfo.windowInfos.size());i3++){
     1591                                if(lstrcmpi(ProjectInfo.windowInfos[i3].name,temp2)==0){
    15851592                                    NewRadWindow(i3);
    15861593                                    break;
     
    17031710                        }
    17041711                        else if(lstrcmpi(temporary,"rad")==0){
    1705                             for(i3=0;i3<ProjectInfo.NumberOfWindows;i3++){
    1706                                 if(lstrcmpi(ProjectInfo.pWindowInfo[i3].name,temp2)==0){
     1712                            for(i3=0;i3<static_cast<int>(ProjectInfo.windowInfos.size());i3++){
     1713                                if(lstrcmpi(ProjectInfo.windowInfos[i3].name,temp2)==0){
    17071714                                    NewRadWindow(i3);
    17081715                                    break;
     
    18971904        }
    18981905        else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){
    1899             for(i=0;i<ProjectInfo.NumberOfWindows;i++){
    1900                 if(lstrcmp(MdiInfo[WndNum].path,ProjectInfo.pWindowInfo[i].name)==0){
     1906            BOOST_FOREACH( const WINDOW_INFO &windowInfo, ProjectInfo.windowInfos )
     1907            {
     1908                if(lstrcmp(MdiInfo[WndNum].path, windowInfo.name)==0){
    19011909                    SendMessage(hCloseChild,WM_CLOSE,0,0);
    19021910                    break;
     
    19311939
    19321940    //ウィンドウ情報のメモリを解放
    1933     for(i=0;i<ProjectInfo.NumberOfWindows;i++){
    1934         HeapDefaultFree(ProjectInfo.pWindowInfo[i].name);
    1935         HeapDefaultFree(ProjectInfo.pWindowInfo[i].HandleName);
    1936         HeapDefaultFree(ProjectInfo.pWindowInfo[i].caption);
    1937         HeapDefaultFree(ProjectInfo.pWindowInfo[i].ClassName);
    1938         HeapDefaultFree(ProjectInfo.pWindowInfo[i].CallBackName);
    1939         HeapDefaultFree(ProjectInfo.pWindowInfo[i].filepath);
    1940         if(ProjectInfo.pWindowInfo[i].MenuID)
    1941             HeapDefaultFree(ProjectInfo.pWindowInfo[i].MenuID);
    1942         if(ProjectInfo.pWindowInfo[i].IconResName)
    1943             HeapDefaultFree(ProjectInfo.pWindowInfo[i].IconResName);
     1941    BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos )
     1942    {
     1943        HeapDefaultFree(windowInfo.name);
     1944        HeapDefaultFree(windowInfo.HandleName);
     1945        HeapDefaultFree(windowInfo.caption);
     1946        HeapDefaultFree(windowInfo.ClassName);
     1947        HeapDefaultFree(windowInfo.CallBackName);
     1948        HeapDefaultFree(windowInfo.filepath);
     1949        if(windowInfo.MenuID)
     1950            HeapDefaultFree(windowInfo.MenuID);
     1951        if(windowInfo.IconResName)
     1952            HeapDefaultFree(windowInfo.IconResName);
    19441953
    19451954        //子ウィンドウのメモリを解放
    1946         for(i2=0;i2<ProjectInfo.pWindowInfo[i].NumberOfChildWindows;i2++){
    1947             HeapDefaultFree(ProjectInfo.pWindowInfo[i].pChildInfo[i2].IdName);
    1948             HeapDefaultFree(ProjectInfo.pWindowInfo[i].pChildInfo[i2].caption);
    1949             if(ProjectInfo.pWindowInfo[i].pChildInfo[i2].Control==CT_IMAGEBOX){
     1955        for(i2=0;i2<windowInfo.NumberOfChildWindows;i2++){
     1956            HeapDefaultFree(windowInfo.pChildInfo[i2].IdName);
     1957            HeapDefaultFree(windowInfo.pChildInfo[i2].caption);
     1958            if(windowInfo.pChildInfo[i2].Control==CT_IMAGEBOX){
    19501959                //イメージ ボックスの場合
    1951                 HeapDefaultFree(ProjectInfo.pWindowInfo[i].pChildInfo[i2].ImageCtrlInfo.path);
    1952             }
    1953         }
    1954         HeapDefaultFree(ProjectInfo.pWindowInfo[i].pChildInfo);
    1955     }
    1956     HeapDefaultFree(ProjectInfo.pWindowInfo);
     1960                HeapDefaultFree(windowInfo.pChildInfo[i2].ImageCtrlInfo.path);
     1961            }
     1962        }
     1963        HeapDefaultFree(windowInfo.pChildInfo);
     1964    }
     1965    ProjectInfo.windowInfos.clear();
    19571966
    19581967    //メニュー情報のメモリを解放
     
    20412050        }
    20422051        else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){
    2043             for(i=0;i<ProjectInfo.NumberOfWindows;i++){
    2044                 if(lstrcmpi(MdiInfo[WndNum].path,ProjectInfo.pWindowInfo[i].name)==0){
     2052            BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos )
     2053            {
     2054                if(lstrcmpi(MdiInfo[WndNum].path,windowInfo.name)==0){
    20452055                    sprintf(buffer+i2,"rad,%s\r\n",MdiInfo[WndNum].path);
    20462056                    i2+=lstrlen(buffer+i2);
     
    21782188        i2+=lstrlen(buffer+i2);
    21792189    }
    2180     sprintf(buffer+i2,"#USEWINDOW=%d\r\n\r\n",ProjectInfo.NumberOfWindows);
     2190    sprintf(buffer+i2,"#USEWINDOW=%d\r\n\r\n",ProjectInfo.windowInfos.size());
    21812191    i2+=lstrlen(buffer+i2);
    21822192    sprintf(buffer+i2,"#OPTION=&H%08x\r\n\r\n",ProjectInfo.dwOption);
     
    23122322        }
    23132323    }
    2314     if(ProjectInfo.NumberOfWindows){
     2324    if( !ProjectInfo.windowInfos.empty() )
     2325    {
    23152326        lstrcpy(buffer+i2,"\r\n");
    23162327        i2+=lstrlen(buffer+i2);
     
    23332344        }
    23342345    }
    2335     if(ProjectInfo.NumberOfWindows){
     2346    if( !ProjectInfo.windowInfos.empty() )
     2347    {
    23362348        lstrcpy(buffer+i2,"\r\n");
    23372349        i2+=lstrlen(buffer+i2);
     
    23582370
    23592371
    2360     if(ProjectInfo.NumberOfWindows){
     2372    if( !ProjectInfo.windowInfos.empty() )
     2373    {
    23612374        /////////////////////////////////////////////////////
    23622375        //ウィンドウ関連ファイル(*.wnd)を作成、保存
    23632376        if(ProjectInfo.ModifyOfMaterial){
    23642377            sprintf(temporary,"%s%s.wnd",ProjectInfo.dir,ProjectInfo.name);
    2365             SaveWindowFile(temporary,ProjectInfo.pWindowInfo,ProjectInfo.NumberOfWindows);
     2378            SaveWindowFile( temporary, ProjectInfo.windowInfos );
    23662379        }
    23672380
     
    24382451            SourceTime.dwLowDateTime>ExeTime.dwLowDateTime) return 1;
    24392452    }
    2440     if(ProjectInfo.NumberOfWindows){
     2453    if( !ProjectInfo.windowInfos.empty() )
     2454    {
    24412455        //CallBack.wbp
    24422456        lstrcpy(temporary,"CallBack.wbp");
  • trunk/ab5.0/abdev/abdev/RadProc.cpp

    r475 r609  
    1313    RECT rect;
    1414    MDICREATESTRUCT mdic;
    15     WINDOW_INFO *pWindowInfo;
    16 
    17     pWindowInfo=&ProjectInfo.pWindowInfo[WndInfoNum];
     15    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
    1816
    1917    //すでに指定されたファイルが開かれている場合
     
    169167    CHILDINFO *pChildInfo;
    170168
    171     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo,(ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows+1)*sizeof(WINDOW_INFO));
     169    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     170
     171    pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,(pWindowInfo->NumberOfChildWindows+1)*sizeof(WINDOW_INFO));
    172172    if(ItemNum==-1)
    173         NewItemNum=ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;
     173        NewItemNum=pWindowInfo->NumberOfChildWindows;
    174174    else{
    175         for(i=ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i>ItemNum;i--)
    176             ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i]=ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i-1];
     175        for(i=pWindowInfo->NumberOfChildWindows;i>ItemNum;i--)
     176            pWindowInfo->pChildInfo[i]=pWindowInfo->pChildInfo[i-1];
    177177        NewItemNum=ItemNum;
    178178    }
    179     pChildInfo=&ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[NewItemNum];
     179    pChildInfo=&pWindowInfo->pChildInfo[NewItemNum];
    180180
    181181    //ID
     
    199199        else sprintf(temporary,"%s%d",IdName,i2);
    200200SearchStart:
    201         for(i=0;i<ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++){
     201        for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){
    202202            if(i!=NewItemNum){
    203                 if(lstrcmp(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].IdName,temporary)==0){
     203                if(lstrcmp(pWindowInfo->pChildInfo[i].IdName,temporary)==0){
    204204                    i2++;
    205205                    sprintf(temporary,"%s%d",IdName,i2);
     
    256256        Rad_NoticeChanging(WndNum,RAD_UNDO_INSERTITEM,NewItemNum,(DWORD)pChildInfo);
    257257
    258     ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows++;
    259 
    260     DrawRadWindow(WndNum,&ProjectInfo.pWindowInfo[WndInfoNum]);
     258    pWindowInfo->NumberOfChildWindows++;
     259
     260    DrawRadWindow(WndNum,pWindowInfo);
    261261    return NewItemNum;
    262262}
     
    267267    int i;
    268268
     269    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     270
    269271    //変更情報
    270272    if(bNoticeChanging)
    271         Rad_NoticeChanging(WndNum,RAD_UNDO_DELETEITEM,ItemNum,(DWORD)&ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum]);
     273        Rad_NoticeChanging(WndNum,RAD_UNDO_DELETEITEM,ItemNum,(DWORD)&pWindowInfo->pChildInfo[ItemNum]);
    272274
    273275    //子ウィンドウのメモリを解放
    274     HeapDefaultFree(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].IdName);
    275     HeapDefaultFree(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].caption);
    276     if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].Control==CT_IMAGEBOX){
     276    HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].IdName);
     277    HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].caption);
     278    if(pWindowInfo->pChildInfo[ItemNum].Control==CT_IMAGEBOX){
    277279        //イメージ ボックスの場合
    278         HeapDefaultFree(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].ImageCtrlInfo.path);
    279     }
    280 
    281     ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows--;
    282     for(i=ItemNum;i<ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++)
    283         ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i]=ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i+1];
    284     if(ProjectInfo.NumberOfWindows==0) ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo,1);
    285     else ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo,ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows*sizeof(CHILDINFO));
    286 
    287     DrawRadWindow(WndNum,&ProjectInfo.pWindowInfo[WndInfoNum]);
     280        HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].ImageCtrlInfo.path);
     281    }
     282
     283    pWindowInfo->NumberOfChildWindows--;
     284    for(i=ItemNum;i<pWindowInfo->NumberOfChildWindows;i++)
     285        pWindowInfo->pChildInfo[i]=pWindowInfo->pChildInfo[i+1];
     286    if(ProjectInfo.windowInfos.size()==0) pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,1);
     287    else pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,pWindowInfo->NumberOfChildWindows*sizeof(CHILDINFO));
     288
     289    DrawRadWindow(WndNum,pWindowInfo);
    288290
    289291
     
    341343    RECT rect;
    342344
     345    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     346
    343347    hdc=GetDC(hwnd);
    344348
    345349    sw=0;
    346350    if(pobj_nv->bLineAdjust&&bLA){
    347         for(i=0;i<ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++){
     351        for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){
    348352            if(i==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) continue;
    349             if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control !=
    350                 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control) continue;
     353            if(pWindowInfo->pChildInfo[i].Control !=
     354                pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control) continue;
    351355
    352356            if(NewRect->left<OldRect->left){
    353                 if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x
     357                if(pWindowInfo->pChildInfo[i].pos.x
    354358                                            >
    355359                    NewRect->left - MdiInfo[WndNum].MdiRadInfo->ClientPos.x
    356360                    &&
    357                     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x-10
     361                    pWindowInfo->pChildInfo[i].pos.x-10
    358362                                            <
    359363                    NewRect->left - MdiInfo[WndNum].MdiRadInfo->ClientPos.x){
     
    361365                    //左側をストップする
    362366                    x=NewRect->right-NewRect->left;
    363                     NewRect->left=ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x + MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
     367                    NewRect->left=pWindowInfo->pChildInfo[i].pos.x + MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
    364368                    NewRect->right=NewRect->left+x;
    365369
     
    376380            }
    377381            if(NewRect->top<OldRect->top){
    378                 if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y
     382                if(pWindowInfo->pChildInfo[i].pos.y
    379383                                            >
    380384                    NewRect->top - MdiInfo[WndNum].MdiRadInfo->ClientPos.y
    381385                    &&
    382                     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y-10
     386                    pWindowInfo->pChildInfo[i].pos.y-10
    383387                                            <
    384388                    NewRect->top - MdiInfo[WndNum].MdiRadInfo->ClientPos.y){
     
    386390                    //左側をストップする
    387391                    y=NewRect->bottom-NewRect->top;
    388                     NewRect->top=ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y + MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
     392                    NewRect->top=pWindowInfo->pChildInfo[i].pos.y + MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
    389393                    NewRect->bottom=NewRect->top+y;
    390394
     
    441445    extern MDIINFO MdiInfo[MAX_WNDNUM];
    442446    extern PROJECTINFO ProjectInfo;
     447
     448    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     449
    443450    if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]==SELECT_WINDOW){
    444451        //ウィンドウ軸を選択
    445452        rect->left=0;
    446453        rect->top=0;
    447         rect->right=ProjectInfo.pWindowInfo[WndInfoNum].size.cx+(LEVER_THICK*2);
    448         rect->bottom=ProjectInfo.pWindowInfo[WndInfoNum].size.cy+(LEVER_THICK*2);
     454        rect->right=pWindowInfo->size.cx+(LEVER_THICK*2);
     455        rect->bottom=pWindowInfo->size.cy+(LEVER_THICK*2);
    449456    }
    450457    else{
    451458        //子ウィンドウを選択
    452         rect->left=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x-LEVER_THICK;
    453         rect->top=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y-LEVER_THICK;
    454         rect->right=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cx+LEVER_THICK;
    455         rect->bottom=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cy+LEVER_THICK;
     459        rect->left=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x-LEVER_THICK;
     460        rect->top=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y-LEVER_THICK;
     461        rect->right=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cx+LEVER_THICK;
     462        rect->bottom=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cy+LEVER_THICK;
    456463    }
    457464}
     
    538545    SCROLLINFO ScrollInfo;
    539546
     547    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     548
    540549    DestroyWindow(MdiInfo[WndNum].MdiRadInfo->hProp_Dlg);
    541550    if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
     
    551560    }
    552561    else{
    553         if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON)
     562        if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON)
    554563            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_BUTTON),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ButtonProc);
    555         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX)
     564        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX)
    556565            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_CHECKBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_CheckBoxProc);
    557         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX)
     566        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX)
    558567            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_COMBOBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ComboBoxProc);
    559         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT)
     568        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT)
    560569            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_EDIT),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_EditProc);
    561         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX)
     570        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX)
    562571            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_GROUPBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_GroupBoxProc);
    563         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_HSCROLLBAR)
     572        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_HSCROLLBAR)
    564573            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_SCROLLBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ScrollBarProc);
    565         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX)
     574        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX)
    566575            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_IMAGEBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ImageBoxProc);
    567         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX)
     576        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX)
    568577            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_LISTBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ListBoxProc);
    569         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW)
     578        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW)
    570579            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_LISTVIEW),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ListViewProc);
    571         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR)
     580        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR)
    572581            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_PROGRESSBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ProgressBarProc);
    573         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON)
     582        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON)
    574583            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_RADIOBUTTON),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_RadioButtonProc);
    575         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC)
     584        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC)
    576585            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_STATIC),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_StaticProc);
    577         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR)
     586        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR)
    578587            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_TRACKBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_TrackBarProc);
    579         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW)
     588        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW)
    580589            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_TREEVIEW),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_TreeViewProc);
    581         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN)
     590        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN)
    582591            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_UPDOWN),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_UpDownProc);
    583         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_VSCROLLBAR)
     592        else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_VSCROLLBAR)
    584593            MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_SCROLLBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ScrollBarProc);
    585594
     
    598607    int i;
    599608
    600     for(i=ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows-1;i>=0;i--){
    601         if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control==CT_COMBOBOX&&
    602             (ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].style&0x000F)!=CBS_SIMPLE){
     609    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     610
     611    for(i=pWindowInfo->NumberOfChildWindows-1;i>=0;i--){
     612        if(pWindowInfo->pChildInfo[i].Control==CT_COMBOBOX&&
     613            (pWindowInfo->pChildInfo[i].style&0x000F)!=CBS_SIMPLE){
    603614            //コンボ ボックスの場合は表示部分をターゲットに選択する(高さ20pixel)
    604             if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x&&
    605                 x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx&&
    606                 y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y&&
    607                 y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+20){
     615            if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x&&
     616                x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx&&
     617                y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y&&
     618                y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+20){
    608619                break;
    609620            }
    610621        }
    611         else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control==CT_GROUPBOX){
     622        else if(pWindowInfo->pChildInfo[i].Control==CT_GROUPBOX){
    612623            //グループ ボックスの場合は中央をあける
    613624            if((
    614                 x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x&&
    615                 x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx&&
    616                 y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y&&
    617                 y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy
     625                x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x&&
     626                x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx&&
     627                y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y&&
     628                y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy
    618629                )&&
    619630                (!(
    620                 x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+LEVER_THICK*2&&
    621                 x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx-LEVER_THICK*2&&
    622                 y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+LEVER_THICK*3&&
    623                 y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy-LEVER_THICK*2
     631                x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+LEVER_THICK*2&&
     632                x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx-LEVER_THICK*2&&
     633                y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+LEVER_THICK*3&&
     634                y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy-LEVER_THICK*2
    624635                ))
    625636                ){
     
    627638            }
    628639        }
    629         else if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x&&
    630             x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx&&
    631             y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y&&
    632             y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy){
     640        else if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x&&
     641            x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx&&
     642            y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y&&
     643            y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy){
    633644            break;
    634645        }
     
    667678    RECT rect;
    668679
     680    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     681
    669682    for(i=1;i<MAX_RAD_SELITEM;i++) MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]=-1;
    670683    RectNaturalFormat(pRect,&rect);
    671684    if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) sw=0;
    672685    else sw=1;
    673     for(i=ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows-1,i2=0;i>=0;i--){
    674         if(rect.left <= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&
    675             rect.top <= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y&&
    676             rect.right >= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&
    677             rect.bottom >= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y){
     686    for(i=pWindowInfo->NumberOfChildWindows-1,i2=0;i>=0;i--){
     687        if(rect.left <= pWindowInfo->pChildInfo[i].pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&
     688            rect.top <= pWindowInfo->pChildInfo[i].pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y&&
     689            rect.right >= pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&
     690            rect.bottom >= pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y){
    678691            MdiInfo[WndNum].MdiRadInfo->SelectingItem[i2]=i;
    679692            i2++;
     
    691704    RECT rect;
    692705
     706    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     707
    693708    if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[1]!=-1){
    694709        i=0;
     
    698713            if(x>=rect.left+LEVER_THICK&&x<=rect.right-LEVER_THICK&&
    699714                y>=rect.top+LEVER_THICK&&y<=rect.bottom-LEVER_THICK){
    700                 if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]].Control==CT_GROUPBOX){
     715                if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]].Control==CT_GROUPBOX){
    701716                    //グループボックスの場合は中央をあける
    702717                    if(!(x>=rect.left+LEVER_THICK*2&&x<=rect.right-LEVER_THICK*2&&
     
    716731            if(x>=rect.left+LEVER_THICK&&x<=rect.right-LEVER_THICK&&
    717732                y>=rect.top+LEVER_THICK&&y<=rect.bottom-LEVER_THICK){
    718                 if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX){
     733                if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX){
    719734                    //グループ ボックスの場合は中央をあける
    720735                    if(!(x>=rect.left+LEVER_THICK*3&&x<=rect.right-LEVER_THICK*3&&
     
    748763    extern PROJECTINFO ProjectInfo;
    749764    extern MDIINFO MdiInfo[MAX_WNDNUM];
    750     int WndInfoNum;
    751765    SCROLLINFO ScrollInfo;
    752766    SIZE NeedSize;
    753767
    754     WndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path);
     768    WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
    755769
    756770    //必要な幅、高さを共に100ピクセル余裕を持たせる
    757     NeedSize.cx=ProjectInfo.pWindowInfo[WndInfoNum].size.cx+(LEVER_THICK*2)+100;
    758     NeedSize.cy=ProjectInfo.pWindowInfo[WndInfoNum].size.cy+(LEVER_THICK*2)+100;
     771    NeedSize.cx=pWindowInfo->size.cx+(LEVER_THICK*2)+100;
     772    NeedSize.cy=pWindowInfo->size.cy+(LEVER_THICK*2)+100;
    759773
    760774    ScrollInfo.cbSize=sizeof(SCROLLINFO);
     
    798812    switch(message){
    799813        case WM_LBUTTONDOWN:
    800             SetCapture(hwnd);
    801 
    802             SetFocus(hwnd);
    803             mouse.x=LOWORD(lParam);
    804             mouse.y=HIWORD(lParam);
    805             CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
    806 
    807             i=GetWndNum(GetParent(hwnd));
    808             i2=GetWndInfoNum(MdiInfo[i].path);
    809 
    810             if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
    811                 if(((wParam&MK_CONTROL)||(wParam&MK_SHIFT))&&
    812                     MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){
    813 
    814                     //Shiftキー、Ctrlキーによる複数選択
    815                     for(i3=0;;i3++){
    816                         if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1){
    817                             MdiInfo[i].MdiRadInfo->SelectingItem[i3]=GetItemNumOnMouse(i,i2,mouse.x,mouse.y);
     814            {
     815                SetCapture(hwnd);
     816
     817                SetFocus(hwnd);
     818                mouse.x=LOWORD(lParam);
     819                mouse.y=HIWORD(lParam);
     820                CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
     821
     822                i=GetWndNum(GetParent(hwnd));
     823                i2 = GetWndInfoNum(MdiInfo[i].path);
     824                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     825
     826                if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
     827                    if(((wParam&MK_CONTROL)||(wParam&MK_SHIFT))&&
     828                        MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){
     829
     830                        //Shiftキー、Ctrlキーによる複数選択
     831                        for(i3=0;;i3++){
     832                            if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1){
     833                                MdiInfo[i].MdiRadInfo->SelectingItem[i3]=GetItemNumOnMouse(i,i2,mouse.x,mouse.y);
     834                                InvalidateRect(hwnd,NULL,0);
     835
     836                                //サポートダイアログの内容をセット
     837                                SetSupportDlgData(i,i2);
     838                                break;
     839                            }
     840                        }
     841                    }
     842                    else{
     843                        RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y);
     844                        if(!RadInfo.NowDragging){
     845                            SelectItemNumOnMouse(i,i2,mouse.x,mouse.y);
    818846                            InvalidateRect(hwnd,NULL,0);
    819 
    820                             //サポートダイアログの内容をセット
    821                             SetSupportDlgData(i,i2);
    822                             break;
    823                         }
    824                     }
     847                            RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y);
     848                        }
     849                        if(RadInfo.NowDragging){
     850                            //アイテム選択中。サイズ、位置変更開始
     851
     852                            if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
     853                                RadInfo.DraggingRect[0].left=LEVER_THICK;
     854                                RadInfo.DraggingRect[0].top=LEVER_THICK;
     855                                RadInfo.DraggingRect[0].right=pWindowInfo->size.cx+LEVER_THICK;
     856                                RadInfo.DraggingRect[0].bottom=pWindowInfo->size.cy+LEVER_THICK;
     857                                RadInfo.DragStartRect[0]=RadInfo.DraggingRect[0];
     858                            }
     859                            else{
     860                                i3=0;
     861                                while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){
     862                                    RadInfo.DraggingRect[i3].left=MdiInfo[i].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x;
     863                                    RadInfo.DraggingRect[i3].top=MdiInfo[i].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y;
     864                                    RadInfo.DraggingRect[i3].right=MdiInfo[i].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx;
     865                                    RadInfo.DraggingRect[i3].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy;
     866                                    RadInfo.DragStartRect[i3]=RadInfo.DraggingRect[i3];
     867                                    i3++;
     868                                }
     869                            }
     870                        }
     871                        else{
     872                            //範囲選択
     873
     874                            RadInfo.NowDragging=SELECTING_FRAME;
     875                            RadInfo.OldDraggingRect[0].left=LEVER_THICK;
     876                            RadInfo.OldDraggingRect[0].top=LEVER_THICK;
     877                            RadInfo.OldDraggingRect[0].right=pWindowInfo->size.cx+LEVER_THICK;
     878                            RadInfo.OldDraggingRect[0].bottom=pWindowInfo->size.cy+LEVER_THICK;
     879                        }
     880                        RadInfo.DragStartPos.x=mouse.x;
     881                        RadInfo.DragStartPos.y=mouse.y;
     882                    }
     883                    SetCursorByState(RadInfo.NowDragging);
    825884                }
    826885                else{
    827                     RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y);
    828                     if(!RadInfo.NowDragging){
    829                         SelectItemNumOnMouse(i,i2,mouse.x,mouse.y);
    830                         InvalidateRect(hwnd,NULL,0);
    831                         RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y);
    832                     }
     886                    RadInfo.DraggingRect[0].left=mouse.x;
     887                    RadInfo.DraggingRect[0].top=mouse.y;
     888                    RadInfo.NowDragging=ITEM_MAKING;
     889                }
     890                return 0;
     891            }
     892        case WM_LBUTTONUP:
     893            {
     894                ReleaseCapture();
     895
     896                SetFocus(hwnd);
     897                mouse.x=(int)(short)LOWORD(lParam);
     898                mouse.y=(int)(short)HIWORD(lParam);
     899                CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
     900
     901                hParent=GetParent(hwnd);
     902                i=GetWndNum(hParent);
     903                i2 = GetWndInfoNum(MdiInfo[i].path);
     904                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     905
     906                if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
    833907                    if(RadInfo.NowDragging){
    834                         //アイテム選択中。サイズ、位置変更開始
     908                        if(RadInfo.DragStartPos.x==mouse.x&&RadInfo.DragStartPos.y==mouse.y){
     909                            RadInfo.NowDragging=0;
     910                            InvalidateRect(hwnd,NULL,0);
     911                            ResetState_EditMenu();
     912                            return 0;
     913                        }
    835914
    836915                        if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
    837                             RadInfo.DraggingRect[0].left=LEVER_THICK;
    838                             RadInfo.DraggingRect[0].top=LEVER_THICK;
    839                             RadInfo.DraggingRect[0].right=ProjectInfo.pWindowInfo[i2].size.cx+LEVER_THICK;
    840                             RadInfo.DraggingRect[0].bottom=ProjectInfo.pWindowInfo[i2].size.cy+LEVER_THICK;
    841                             RadInfo.DragStartRect[0]=RadInfo.DraggingRect[0];
     916                            if(RadInfo.NowDragging==SELECTING_FRAME){
     917                                SetItemNumOnFrame(i,i2,&RadInfo.DraggingRect[0]);
     918                                InvalidateRect(hwnd,NULL,1);
     919                            }
     920                            else{
     921                                //ウィンドウ枠の調整完了
     922                                PointAndSize.size=pWindowInfo->size;
     923                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
     924                                pWindowInfo->size.cx=RadInfo.DraggingRect[0].right-LEVER_THICK;
     925                                pWindowInfo->size.cy=RadInfo.DraggingRect[0].bottom-LEVER_THICK;
     926                                DrawRadWindow(i,pWindowInfo);
     927                                InvalidateRect(hwnd,NULL,1);
     928
     929                                GetClientRect(hwnd,&rect);
     930                                ResetScrollbarOfRadEditor(i,rect.right,rect.bottom);
     931                            }
    842932                        }
    843933                        else{
    844934                            i3=0;
    845935                            while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){
    846                                 RadInfo.DraggingRect[i3].left=MdiInfo[i].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x;
    847                                 RadInfo.DraggingRect[i3].top=MdiInfo[i].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y;
    848                                 RadInfo.DraggingRect[i3].right=MdiInfo[i].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx;
    849                                 RadInfo.DraggingRect[i3].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy;
    850                                 RadInfo.DragStartRect[i3]=RadInfo.DraggingRect[i3];
     936                                //アイテム枠の調整完了
     937                                PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
     938                                PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
     939                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
     940                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x=RadInfo.DraggingRect[i3].left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     941                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y=RadInfo.DraggingRect[i3].top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     942                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx=RadInfo.DraggingRect[i3].right-RadInfo.DraggingRect[i3].left;
     943                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy=RadInfo.DraggingRect[i3].bottom-RadInfo.DraggingRect[i3].top;
     944                                DrawRadWindow(i,pWindowInfo);
    851945                                i3++;
    852946                            }
    853947                        }
    854                     }
    855                     else{
    856                         //範囲選択
    857 
    858                         RadInfo.NowDragging=SELECTING_FRAME;
    859                         RadInfo.OldDraggingRect[0].left=LEVER_THICK;
    860                         RadInfo.OldDraggingRect[0].top=LEVER_THICK;
    861                         RadInfo.OldDraggingRect[0].right=ProjectInfo.pWindowInfo[i2].size.cx+LEVER_THICK;
    862                         RadInfo.OldDraggingRect[0].bottom=ProjectInfo.pWindowInfo[i2].size.cy+LEVER_THICK;
    863                     }
    864                     RadInfo.DragStartPos.x=mouse.x;
    865                     RadInfo.DragStartPos.y=mouse.y;
     948
     949                        SetStatusText(NULL);
     950
     951                        //サポートダイアログの内容をセット
     952                        SetSupportDlgData(i,i2);
     953                    }
    866954                }
    867                 SetCursorByState(RadInfo.NowDragging);
     955                else if(RadInfo.NowDragging==ITEM_MAKING){
     956                    if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_BUTTON){
     957                        //ボタン コントロール作成
     958                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     959                            RadInfo.DraggingRect[0].left-=44;
     960                            RadInfo.DraggingRect[0].right=mouse.x+44;
     961                            RadInfo.DraggingRect[0].top-=10;
     962                            RadInfo.DraggingRect[0].bottom=mouse.y+11;
     963                        }
     964                        else{
     965                            RadInfo.DraggingRect[0].right=mouse.x;
     966                            RadInfo.DraggingRect[0].bottom=mouse.y;
     967                        }
     968                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     969                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     970                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     971                        size.cx=rect.right-rect.left;
     972                        size.cy=rect.bottom-rect.top;
     973                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CommandButton","Button",WS_CHILD|WS_VISIBLE,0,CT_BUTTON,0,0,1);
     974                    }
     975                    if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_CHECKBOX){
     976                        //チェック ボックス作成
     977                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     978                            RadInfo.DraggingRect[0].left-=33;
     979                            RadInfo.DraggingRect[0].right=mouse.x+34;
     980                            RadInfo.DraggingRect[0].top-=7;
     981                            RadInfo.DraggingRect[0].bottom=mouse.y+8;
     982                        }
     983                        else{
     984                            RadInfo.DraggingRect[0].right=mouse.x;
     985                            RadInfo.DraggingRect[0].bottom=mouse.y;
     986                        }
     987                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     988                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     989                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     990                        size.cx=rect.right-rect.left;
     991                        size.cy=rect.bottom-rect.top;
     992                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CheckBox","Check",WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,0,CT_CHECKBOX,0,0,1);
     993                    }
     994                    if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_COMBOBOX){
     995                        //コンボ ボックス作成
     996                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     997                            RadInfo.DraggingRect[0].left-=42;
     998                            RadInfo.DraggingRect[0].right=mouse.x+42;
     999                            RadInfo.DraggingRect[0].top-=42;
     1000                            RadInfo.DraggingRect[0].bottom=mouse.y+42;
     1001                        }
     1002                        else{
     1003                            RadInfo.DraggingRect[0].right=mouse.x;
     1004                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1005                        }
     1006                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1007                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1008                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1009                        size.cx=rect.right-rect.left;
     1010                        size.cy=rect.bottom-rect.top;
     1011                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ComboBox","",WS_CHILD|WS_VISIBLE|CBS_DROPDOWN|CBS_SORT|WS_VSCROLL,0,CT_COMBOBOX,0,0,1);
     1012                    }
     1013                    else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_EDIT){
     1014                        //エディット コントロール作成
     1015                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1016                            RadInfo.DraggingRect[0].left-=35;
     1017                            RadInfo.DraggingRect[0].right=mouse.x+35;
     1018                            RadInfo.DraggingRect[0].top-=10;
     1019                            RadInfo.DraggingRect[0].bottom=mouse.y+11;
     1020                        }
     1021                        else{
     1022                            RadInfo.DraggingRect[0].right=mouse.x;
     1023                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1024                        }
     1025                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1026                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1027                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1028                        size.cx=rect.right-rect.left;
     1029                        size.cy=rect.bottom-rect.top;
     1030                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"EditBox","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_EDIT,0,0,1);
     1031                    }
     1032                    else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_GROUPBOX){
     1033                        //グループ ボックス作成
     1034                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1035                            RadInfo.DraggingRect[0].left-=42;
     1036                            RadInfo.DraggingRect[0].right=mouse.x+42;
     1037                            RadInfo.DraggingRect[0].top-=30;
     1038                            RadInfo.DraggingRect[0].bottom=mouse.y+30;
     1039                        }
     1040                        else{
     1041                            RadInfo.DraggingRect[0].right=mouse.x;
     1042                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1043                        }
     1044                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1045                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1046                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1047                        size.cx=rect.right-rect.left;
     1048                        size.cy=rect.bottom-rect.top;
     1049                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"GroupBox","Group",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,0,CT_GROUPBOX,0,0,1);
     1050                    }
     1051                    else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_HSCROLLBAR){
     1052                        //水平スクロールバー作成
     1053                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1054                            RadInfo.DraggingRect[0].left-=35;
     1055                            RadInfo.DraggingRect[0].right=mouse.x+35;
     1056                            RadInfo.DraggingRect[0].top-=8;
     1057                            RadInfo.DraggingRect[0].bottom=mouse.y+9;
     1058                        }
     1059                        else{
     1060                            RadInfo.DraggingRect[0].right=mouse.x;
     1061                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1062                        }
     1063                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1064                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1065                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1066                        size.cx=rect.right-rect.left;
     1067                        size.cy=rect.bottom-rect.top;
     1068                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"HScrollBar","",WS_CHILD|WS_VISIBLE|SBS_HORZ,0,CT_HSCROLLBAR,0,0,1);
     1069                    }
     1070                    else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_IMAGEBOX){
     1071                        //イメージ ボックス作成
     1072                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1073                            RadInfo.DraggingRect[0].left-=16;
     1074                            RadInfo.DraggingRect[0].right=mouse.x+16;
     1075                            RadInfo.DraggingRect[0].top-=16;
     1076                            RadInfo.DraggingRect[0].bottom=mouse.y+16;
     1077                        }
     1078                        else{
     1079                            RadInfo.DraggingRect[0].right=mouse.x;
     1080                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1081                        }
     1082                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1083                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1084                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1085                        size.cx=rect.right-rect.left;
     1086                        size.cy=rect.bottom-rect.top;
     1087                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ImageBox","",WS_CHILD|WS_VISIBLE|SS_BLACKFRAME,0,CT_IMAGEBOX,IMGTYPE_FILE,0,1);
     1088                    }
     1089                    else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTBOX){
     1090                        //リスト ボックス作成
     1091                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1092                            RadInfo.DraggingRect[0].left-=42;
     1093                            RadInfo.DraggingRect[0].right=mouse.x+42;
     1094                            RadInfo.DraggingRect[0].top-=30;
     1095                            RadInfo.DraggingRect[0].bottom=mouse.y+30;
     1096                        }
     1097                        else{
     1098                            RadInfo.DraggingRect[0].right=mouse.x;
     1099                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1100                        }
     1101                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1102                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1103                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1104                        size.cx=rect.right-rect.left;
     1105                        size.cy=rect.bottom-rect.top;
     1106                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListBox","",WS_CHILD|WS_VISIBLE|WS_VSCROLL|LBS_SORT|LBS_NOTIFY,WS_EX_CLIENTEDGE,CT_LISTBOX,0,0,1);
     1107                    }
     1108                    else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTVIEW){
     1109                        //リスト ビュー作成
     1110                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1111                            RadInfo.DraggingRect[0].left-=52;
     1112                            RadInfo.DraggingRect[0].right=mouse.x+53;
     1113                            RadInfo.DraggingRect[0].top-=37;
     1114                            RadInfo.DraggingRect[0].bottom=mouse.y+38;
     1115                        }
     1116                        else{
     1117                            RadInfo.DraggingRect[0].right=mouse.x;
     1118                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1119                        }
     1120                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1121                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1122                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1123                        size.cx=rect.right-rect.left;
     1124                        size.cy=rect.bottom-rect.top;
     1125                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_LISTVIEW,0,0,1);
     1126                    }
     1127                    if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_PROGRESSBAR){
     1128                        //プロバレス バー作成
     1129                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1130                            RadInfo.DraggingRect[0].left-=70;
     1131                            RadInfo.DraggingRect[0].right=mouse.x+70;
     1132                            RadInfo.DraggingRect[0].top-=10;
     1133                            RadInfo.DraggingRect[0].bottom=mouse.y+11;
     1134                        }
     1135                        else{
     1136                            RadInfo.DraggingRect[0].right=mouse.x;
     1137                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1138                        }
     1139                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1140                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1141                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1142                        size.cx=rect.right-rect.left;
     1143                        size.cy=rect.bottom-rect.top;
     1144                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ProgressBar","",WS_CHILD|WS_VISIBLE,WS_EX_STATICEDGE,CT_PROGRESSBAR,0,0,1);
     1145                    }
     1146                    if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_RADIOBUTTON){
     1147                        //ラジオ ボタン作成
     1148                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1149                            RadInfo.DraggingRect[0].left-=31;
     1150                            RadInfo.DraggingRect[0].right=mouse.x+32;
     1151                            RadInfo.DraggingRect[0].top-=7;
     1152                            RadInfo.DraggingRect[0].bottom=mouse.y+8;
     1153                        }
     1154                        else{
     1155                            RadInfo.DraggingRect[0].right=mouse.x;
     1156                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1157                        }
     1158                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1159                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1160                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1161                        size.cx=rect.right-rect.left;
     1162                        size.cy=rect.bottom-rect.top;
     1163                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"RadioButton","radio",WS_CHILD|WS_VISIBLE|BS_AUTORADIOBUTTON,0,CT_RADIOBUTTON,0,0,1);
     1164                    }
     1165                    else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_STATIC){
     1166                        //スタティック コントロール作成
     1167                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1168                            RadInfo.DraggingRect[0].left-=25;
     1169                            RadInfo.DraggingRect[0].right=mouse.x+25;
     1170                            RadInfo.DraggingRect[0].top-=6;
     1171                            RadInfo.DraggingRect[0].bottom=mouse.y+6;
     1172                        }
     1173                        else{
     1174                            RadInfo.DraggingRect[0].right=mouse.x;
     1175                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1176                        }
     1177                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1178                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1179                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1180                        size.cx=rect.right-rect.left;
     1181                        size.cy=rect.bottom-rect.top;
     1182                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"Static","Text",WS_CHILD|WS_VISIBLE,0,CT_STATIC,0,0,1);
     1183                    }
     1184                    else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TRACKBAR){
     1185                        //トラック バー作成
     1186                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1187                            RadInfo.DraggingRect[0].left-=87;
     1188                            RadInfo.DraggingRect[0].right=mouse.x+88;
     1189                            RadInfo.DraggingRect[0].top-=11;
     1190                            RadInfo.DraggingRect[0].bottom=mouse.y+12;
     1191                        }
     1192                        else{
     1193                            RadInfo.DraggingRect[0].right=mouse.x;
     1194                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1195                        }
     1196                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1197                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1198                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1199                        size.cx=rect.right-rect.left;
     1200                        size.cy=rect.bottom-rect.top;
     1201                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TrackBar","",WS_CHILD|WS_VISIBLE|TBS_BOTH|TBS_NOTICKS,0,CT_TRACKBAR,0,0,1);
     1202                    }
     1203                    else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TREEVIEW){
     1204                        //ツリー ビュー作成
     1205                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1206                            RadInfo.DraggingRect[0].left-=52;
     1207                            RadInfo.DraggingRect[0].right=mouse.x+53;
     1208                            RadInfo.DraggingRect[0].top-=37;
     1209                            RadInfo.DraggingRect[0].bottom=mouse.y+38;
     1210                        }
     1211                        else{
     1212                            RadInfo.DraggingRect[0].right=mouse.x;
     1213                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1214                        }
     1215                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1216                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1217                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1218                        size.cx=rect.right-rect.left;
     1219                        size.cy=rect.bottom-rect.top;
     1220                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TreeView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_TREEVIEW,0,0,1);
     1221                    }
     1222                    else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_UPDOWN){
     1223                        //アップ ダウン コントロール作成
     1224                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1225                            RadInfo.DraggingRect[0].left-=8;
     1226                            RadInfo.DraggingRect[0].right=mouse.x+8;
     1227                            RadInfo.DraggingRect[0].top-=10;
     1228                            RadInfo.DraggingRect[0].bottom=mouse.y+11;
     1229                        }
     1230                        else{
     1231                            RadInfo.DraggingRect[0].right=mouse.x;
     1232                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1233                        }
     1234                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1235                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1236                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1237                        size.cx=rect.right-rect.left;
     1238                        size.cy=rect.bottom-rect.top;
     1239                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"UpDown","",WS_CHILD|WS_VISIBLE,0,CT_UPDOWN,0,0,1);
     1240                    }
     1241                    else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_VSCROLLBAR){
     1242                        //垂直スクロールバー作成
     1243                        if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
     1244                            RadInfo.DraggingRect[0].left-=9;
     1245                            RadInfo.DraggingRect[0].right=mouse.x+9;
     1246                            RadInfo.DraggingRect[0].top-=30;
     1247                            RadInfo.DraggingRect[0].bottom=mouse.y+30;
     1248                        }
     1249                        else{
     1250                            RadInfo.DraggingRect[0].right=mouse.x;
     1251                            RadInfo.DraggingRect[0].bottom=mouse.y;
     1252                        }
     1253                        RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
     1254                        pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
     1255                        pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
     1256                        size.cx=rect.right-rect.left;
     1257                        size.cy=rect.bottom-rect.top;
     1258                        MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"VScrollBar","",WS_CHILD|WS_VISIBLE|SBS_VERT,0,CT_VSCROLLBAR,0,0,1);
     1259                    }
     1260                    SendMessage(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),WM_COMMAND,IDC_TOOL_MOUSE,0);
     1261                    SendMessage(GetWindow(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),GW_CHILD),TB_CHECKBUTTON,IDC_TOOL_MOUSE,TRUE);
     1262                    ChangePropertyWindow(i,i2);
     1263
     1264                    //複数選択を解除
     1265                    MdiInfo[i].MdiRadInfo->SelectingItem[1]=-1;
     1266                }
     1267
     1268                RadInfo.NowDragging=0;
     1269
     1270                ResetState_EditMenu();
     1271                return 0;
    8681272            }
    869             else{
    870                 RadInfo.DraggingRect[0].left=mouse.x;
    871                 RadInfo.DraggingRect[0].top=mouse.y;
    872                 RadInfo.NowDragging=ITEM_MAKING;
    873             }
    874             return 0;
    875         case WM_LBUTTONUP:
    876             ReleaseCapture();
    877 
    878             SetFocus(hwnd);
    879             mouse.x=(int)(short)LOWORD(lParam);
    880             mouse.y=(int)(short)HIWORD(lParam);
    881             CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
    882 
    883             hParent=GetParent(hwnd);
    884             i=GetWndNum(hParent);
    885             i2=GetWndInfoNum(MdiInfo[i].path);
    886 
    887             if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
    888                 if(RadInfo.NowDragging){
    889                     if(RadInfo.DragStartPos.x==mouse.x&&RadInfo.DragStartPos.y==mouse.y){
    890                         RadInfo.NowDragging=0;
    891                         InvalidateRect(hwnd,NULL,0);
    892                         ResetState_EditMenu();
    893                         return 0;
    894                     }
    895 
    896                     if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
    897                         if(RadInfo.NowDragging==SELECTING_FRAME){
    898                             SetItemNumOnFrame(i,i2,&RadInfo.DraggingRect[0]);
    899                             InvalidateRect(hwnd,NULL,1);
    900                         }
    901                         else{
    902                             //ウィンドウ枠の調整完了
    903                             PointAndSize.size=ProjectInfo.pWindowInfo[i2].size;
    904                             Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
    905                             ProjectInfo.pWindowInfo[i2].size.cx=RadInfo.DraggingRect[0].right-LEVER_THICK;
    906                             ProjectInfo.pWindowInfo[i2].size.cy=RadInfo.DraggingRect[0].bottom-LEVER_THICK;
    907                             DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    908                             InvalidateRect(hwnd,NULL,1);
    909 
    910                             GetClientRect(hwnd,&rect);
    911                             ResetScrollbarOfRadEditor(i,rect.right,rect.bottom);
    912                         }
    913                     }
    914                     else{
    915                         i3=0;
    916                         while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){
    917                             //アイテム枠の調整完了
    918                             PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
    919                             PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
    920                             Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
    921                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x=RadInfo.DraggingRect[i3].left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    922                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y=RadInfo.DraggingRect[i3].top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    923                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx=RadInfo.DraggingRect[i3].right-RadInfo.DraggingRect[i3].left;
    924                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy=RadInfo.DraggingRect[i3].bottom-RadInfo.DraggingRect[i3].top;
    925                             DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    926                             i3++;
    927                         }
    928                     }
    929 
    930                     SetStatusText(NULL);
    931 
    932                     //サポートダイアログの内容をセット
    933                     SetSupportDlgData(i,i2);
    934                 }
    935             }
    936             else if(RadInfo.NowDragging==ITEM_MAKING){
    937                 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_BUTTON){
    938                     //ボタン コントロール作成
    939                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    940                         RadInfo.DraggingRect[0].left-=44;
    941                         RadInfo.DraggingRect[0].right=mouse.x+44;
    942                         RadInfo.DraggingRect[0].top-=10;
    943                         RadInfo.DraggingRect[0].bottom=mouse.y+11;
    944                     }
    945                     else{
    946                         RadInfo.DraggingRect[0].right=mouse.x;
    947                         RadInfo.DraggingRect[0].bottom=mouse.y;
    948                     }
    949                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    950                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    951                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    952                     size.cx=rect.right-rect.left;
    953                     size.cy=rect.bottom-rect.top;
    954                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CommandButton","Button",WS_CHILD|WS_VISIBLE,0,CT_BUTTON,0,0,1);
    955                 }
    956                 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_CHECKBOX){
    957                     //チェック ボックス作成
    958                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    959                         RadInfo.DraggingRect[0].left-=33;
    960                         RadInfo.DraggingRect[0].right=mouse.x+34;
    961                         RadInfo.DraggingRect[0].top-=7;
    962                         RadInfo.DraggingRect[0].bottom=mouse.y+8;
    963                     }
    964                     else{
    965                         RadInfo.DraggingRect[0].right=mouse.x;
    966                         RadInfo.DraggingRect[0].bottom=mouse.y;
    967                     }
    968                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    969                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    970                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    971                     size.cx=rect.right-rect.left;
    972                     size.cy=rect.bottom-rect.top;
    973                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CheckBox","Check",WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,0,CT_CHECKBOX,0,0,1);
    974                 }
    975                 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_COMBOBOX){
    976                     //コンボ ボックス作成
    977                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    978                         RadInfo.DraggingRect[0].left-=42;
    979                         RadInfo.DraggingRect[0].right=mouse.x+42;
    980                         RadInfo.DraggingRect[0].top-=42;
    981                         RadInfo.DraggingRect[0].bottom=mouse.y+42;
    982                     }
    983                     else{
    984                         RadInfo.DraggingRect[0].right=mouse.x;
    985                         RadInfo.DraggingRect[0].bottom=mouse.y;
    986                     }
    987                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    988                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    989                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    990                     size.cx=rect.right-rect.left;
    991                     size.cy=rect.bottom-rect.top;
    992                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ComboBox","",WS_CHILD|WS_VISIBLE|CBS_DROPDOWN|CBS_SORT|WS_VSCROLL,0,CT_COMBOBOX,0,0,1);
    993                 }
    994                 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_EDIT){
    995                     //エディット コントロール作成
    996                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    997                         RadInfo.DraggingRect[0].left-=35;
    998                         RadInfo.DraggingRect[0].right=mouse.x+35;
    999                         RadInfo.DraggingRect[0].top-=10;
    1000                         RadInfo.DraggingRect[0].bottom=mouse.y+11;
    1001                     }
    1002                     else{
    1003                         RadInfo.DraggingRect[0].right=mouse.x;
    1004                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1005                     }
    1006                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1007                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1008                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1009                     size.cx=rect.right-rect.left;
    1010                     size.cy=rect.bottom-rect.top;
    1011                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"EditBox","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_EDIT,0,0,1);
    1012                 }
    1013                 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_GROUPBOX){
    1014                     //グループ ボックス作成
    1015                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1016                         RadInfo.DraggingRect[0].left-=42;
    1017                         RadInfo.DraggingRect[0].right=mouse.x+42;
    1018                         RadInfo.DraggingRect[0].top-=30;
    1019                         RadInfo.DraggingRect[0].bottom=mouse.y+30;
    1020                     }
    1021                     else{
    1022                         RadInfo.DraggingRect[0].right=mouse.x;
    1023                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1024                     }
    1025                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1026                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1027                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1028                     size.cx=rect.right-rect.left;
    1029                     size.cy=rect.bottom-rect.top;
    1030                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"GroupBox","Group",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,0,CT_GROUPBOX,0,0,1);
    1031                 }
    1032                 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_HSCROLLBAR){
    1033                     //水平スクロールバー作成
    1034                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1035                         RadInfo.DraggingRect[0].left-=35;
    1036                         RadInfo.DraggingRect[0].right=mouse.x+35;
    1037                         RadInfo.DraggingRect[0].top-=8;
    1038                         RadInfo.DraggingRect[0].bottom=mouse.y+9;
    1039                     }
    1040                     else{
    1041                         RadInfo.DraggingRect[0].right=mouse.x;
    1042                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1043                     }
    1044                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1045                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1046                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1047                     size.cx=rect.right-rect.left;
    1048                     size.cy=rect.bottom-rect.top;
    1049                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"HScrollBar","",WS_CHILD|WS_VISIBLE|SBS_HORZ,0,CT_HSCROLLBAR,0,0,1);
    1050                 }
    1051                 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_IMAGEBOX){
    1052                     //イメージ ボックス作成
    1053                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1054                         RadInfo.DraggingRect[0].left-=16;
    1055                         RadInfo.DraggingRect[0].right=mouse.x+16;
    1056                         RadInfo.DraggingRect[0].top-=16;
    1057                         RadInfo.DraggingRect[0].bottom=mouse.y+16;
    1058                     }
    1059                     else{
    1060                         RadInfo.DraggingRect[0].right=mouse.x;
    1061                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1062                     }
    1063                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1064                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1065                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1066                     size.cx=rect.right-rect.left;
    1067                     size.cy=rect.bottom-rect.top;
    1068                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ImageBox","",WS_CHILD|WS_VISIBLE|SS_BLACKFRAME,0,CT_IMAGEBOX,IMGTYPE_FILE,0,1);
    1069                 }
    1070                 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTBOX){
    1071                     //リスト ボックス作成
    1072                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1073                         RadInfo.DraggingRect[0].left-=42;
    1074                         RadInfo.DraggingRect[0].right=mouse.x+42;
    1075                         RadInfo.DraggingRect[0].top-=30;
    1076                         RadInfo.DraggingRect[0].bottom=mouse.y+30;
    1077                     }
    1078                     else{
    1079                         RadInfo.DraggingRect[0].right=mouse.x;
    1080                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1081                     }
    1082                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1083                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1084                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1085                     size.cx=rect.right-rect.left;
    1086                     size.cy=rect.bottom-rect.top;
    1087                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListBox","",WS_CHILD|WS_VISIBLE|WS_VSCROLL|LBS_SORT|LBS_NOTIFY,WS_EX_CLIENTEDGE,CT_LISTBOX,0,0,1);
    1088                 }
    1089                 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTVIEW){
    1090                     //リスト ビュー作成
    1091                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1092                         RadInfo.DraggingRect[0].left-=52;
    1093                         RadInfo.DraggingRect[0].right=mouse.x+53;
    1094                         RadInfo.DraggingRect[0].top-=37;
    1095                         RadInfo.DraggingRect[0].bottom=mouse.y+38;
    1096                     }
    1097                     else{
    1098                         RadInfo.DraggingRect[0].right=mouse.x;
    1099                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1100                     }
    1101                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1102                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1103                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1104                     size.cx=rect.right-rect.left;
    1105                     size.cy=rect.bottom-rect.top;
    1106                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_LISTVIEW,0,0,1);
    1107                 }
    1108                 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_PROGRESSBAR){
    1109                     //プロバレス バー作成
    1110                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1111                         RadInfo.DraggingRect[0].left-=70;
    1112                         RadInfo.DraggingRect[0].right=mouse.x+70;
    1113                         RadInfo.DraggingRect[0].top-=10;
    1114                         RadInfo.DraggingRect[0].bottom=mouse.y+11;
    1115                     }
    1116                     else{
    1117                         RadInfo.DraggingRect[0].right=mouse.x;
    1118                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1119                     }
    1120                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1121                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1122                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1123                     size.cx=rect.right-rect.left;
    1124                     size.cy=rect.bottom-rect.top;
    1125                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ProgressBar","",WS_CHILD|WS_VISIBLE,WS_EX_STATICEDGE,CT_PROGRESSBAR,0,0,1);
    1126                 }
    1127                 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_RADIOBUTTON){
    1128                     //ラジオ ボタン作成
    1129                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1130                         RadInfo.DraggingRect[0].left-=31;
    1131                         RadInfo.DraggingRect[0].right=mouse.x+32;
    1132                         RadInfo.DraggingRect[0].top-=7;
    1133                         RadInfo.DraggingRect[0].bottom=mouse.y+8;
    1134                     }
    1135                     else{
    1136                         RadInfo.DraggingRect[0].right=mouse.x;
    1137                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1138                     }
    1139                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1140                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1141                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1142                     size.cx=rect.right-rect.left;
    1143                     size.cy=rect.bottom-rect.top;
    1144                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"RadioButton","radio",WS_CHILD|WS_VISIBLE|BS_AUTORADIOBUTTON,0,CT_RADIOBUTTON,0,0,1);
    1145                 }
    1146                 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_STATIC){
    1147                     //スタティック コントロール作成
    1148                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1149                         RadInfo.DraggingRect[0].left-=25;
    1150                         RadInfo.DraggingRect[0].right=mouse.x+25;
    1151                         RadInfo.DraggingRect[0].top-=6;
    1152                         RadInfo.DraggingRect[0].bottom=mouse.y+6;
    1153                     }
    1154                     else{
    1155                         RadInfo.DraggingRect[0].right=mouse.x;
    1156                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1157                     }
    1158                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1159                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1160                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1161                     size.cx=rect.right-rect.left;
    1162                     size.cy=rect.bottom-rect.top;
    1163                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"Static","Text",WS_CHILD|WS_VISIBLE,0,CT_STATIC,0,0,1);
    1164                 }
    1165                 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TRACKBAR){
    1166                     //トラック バー作成
    1167                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1168                         RadInfo.DraggingRect[0].left-=87;
    1169                         RadInfo.DraggingRect[0].right=mouse.x+88;
    1170                         RadInfo.DraggingRect[0].top-=11;
    1171                         RadInfo.DraggingRect[0].bottom=mouse.y+12;
    1172                     }
    1173                     else{
    1174                         RadInfo.DraggingRect[0].right=mouse.x;
    1175                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1176                     }
    1177                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1178                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1179                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1180                     size.cx=rect.right-rect.left;
    1181                     size.cy=rect.bottom-rect.top;
    1182                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TrackBar","",WS_CHILD|WS_VISIBLE|TBS_BOTH|TBS_NOTICKS,0,CT_TRACKBAR,0,0,1);
    1183                 }
    1184                 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TREEVIEW){
    1185                     //ツリー ビュー作成
    1186                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1187                         RadInfo.DraggingRect[0].left-=52;
    1188                         RadInfo.DraggingRect[0].right=mouse.x+53;
    1189                         RadInfo.DraggingRect[0].top-=37;
    1190                         RadInfo.DraggingRect[0].bottom=mouse.y+38;
    1191                     }
    1192                     else{
    1193                         RadInfo.DraggingRect[0].right=mouse.x;
    1194                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1195                     }
    1196                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1197                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1198                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1199                     size.cx=rect.right-rect.left;
    1200                     size.cy=rect.bottom-rect.top;
    1201                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TreeView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_TREEVIEW,0,0,1);
    1202                 }
    1203                 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_UPDOWN){
    1204                     //アップ ダウン コントロール作成
    1205                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1206                         RadInfo.DraggingRect[0].left-=8;
    1207                         RadInfo.DraggingRect[0].right=mouse.x+8;
    1208                         RadInfo.DraggingRect[0].top-=10;
    1209                         RadInfo.DraggingRect[0].bottom=mouse.y+11;
    1210                     }
    1211                     else{
    1212                         RadInfo.DraggingRect[0].right=mouse.x;
    1213                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1214                     }
    1215                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1216                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1217                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1218                     size.cx=rect.right-rect.left;
    1219                     size.cy=rect.bottom-rect.top;
    1220                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"UpDown","",WS_CHILD|WS_VISIBLE,0,CT_UPDOWN,0,0,1);
    1221                 }
    1222                 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_VSCROLLBAR){
    1223                     //垂直スクロールバー作成
    1224                     if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
    1225                         RadInfo.DraggingRect[0].left-=9;
    1226                         RadInfo.DraggingRect[0].right=mouse.x+9;
    1227                         RadInfo.DraggingRect[0].top-=30;
    1228                         RadInfo.DraggingRect[0].bottom=mouse.y+30;
    1229                     }
    1230                     else{
    1231                         RadInfo.DraggingRect[0].right=mouse.x;
    1232                         RadInfo.DraggingRect[0].bottom=mouse.y;
    1233                     }
    1234                     RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
    1235                     pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
    1236                     pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
    1237                     size.cx=rect.right-rect.left;
    1238                     size.cy=rect.bottom-rect.top;
    1239                     MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"VScrollBar","",WS_CHILD|WS_VISIBLE|SBS_VERT,0,CT_VSCROLLBAR,0,0,1);
    1240                 }
    1241                 SendMessage(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),WM_COMMAND,IDC_TOOL_MOUSE,0);
    1242                 SendMessage(GetWindow(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),GW_CHILD),TB_CHECKBUTTON,IDC_TOOL_MOUSE,TRUE);
    1243                 ChangePropertyWindow(i,i2);
    1244 
    1245                 //複数選択を解除
    1246                 MdiInfo[i].MdiRadInfo->SelectingItem[1]=-1;
    1247             }
    1248 
    1249             RadInfo.NowDragging=0;
    1250 
    1251             ResetState_EditMenu();
    1252             return 0;
    12531273        case WM_MOUSEMOVE:
    12541274            mouse.x=(int)(short)LOWORD(lParam);
     
    12581278            hParent=GetParent(hwnd);
    12591279            i=GetWndNum(hParent);
    1260             i2=GetWndInfoNum(MdiInfo[i].path);
     1280            i2 = GetWndInfoNum(MdiInfo[i].path);
    12611281
    12621282            if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
     
    14141434            return 0;
    14151435        case WM_LBUTTONDBLCLK:
    1416             mouse.x=LOWORD(lParam);
    1417             mouse.y=HIWORD(lParam);
    1418             CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
    1419 
    1420             hParent=GetParent(hwnd);
    1421             i=GetWndNum(hParent);
    1422             i2=GetWndInfoNum(MdiInfo[i].path);
    1423             if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
    1424                 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){
    1425                     temp2[0]=0;
    1426                     if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON||
    1427                         ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX||
    1428                         ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX||
    1429                         ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON||
    1430                         ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){
    1431                         sprintf(temporary,"%s_%s_Click",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
    1432                     }
    1433                     else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX)
    1434                         sprintf(temporary,"%s_%s_EditChange",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
    1435                     else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT)
    1436                         sprintf(temporary,"%s_%s_Change",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
    1437                     else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX)
    1438                         sprintf(temporary,"%s_%s_SelChange",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
    1439                     else temporary[0]=0;
    1440                     if(temporary[0]) SelectProcedureOfMessageCall(i2,temporary,temp2);
     1436            {
     1437                mouse.x=LOWORD(lParam);
     1438                mouse.y=HIWORD(lParam);
     1439                CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
     1440
     1441                hParent=GetParent(hwnd);
     1442                i=GetWndNum(hParent);
     1443                i2=GetWndInfoNum(MdiInfo[i].path);
     1444                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     1445                if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
     1446                    if(MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){
     1447                        temp2[0]=0;
     1448                        if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON||
     1449                            pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX||
     1450                            pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX||
     1451                            pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON||
     1452                            pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){
     1453                            sprintf(temporary,"%s_%s_Click",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
     1454                        }
     1455                        else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX)
     1456                            sprintf(temporary,"%s_%s_EditChange",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
     1457                        else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT)
     1458                            sprintf(temporary,"%s_%s_Change",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
     1459                        else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX)
     1460                            sprintf(temporary,"%s_%s_SelChange",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
     1461                        else temporary[0]=0;
     1462                        if(temporary[0]) SelectProcedureOfMessageCall(i2,temporary,temp2);
     1463                    }
    14411464                }
     1465                return 0;
    14421466            }
    1443             return 0;
    14441467        case WM_KEYDOWN:
    1445             hParent=GetParent(hwnd);
    1446             i=GetWndNum(hParent);
    1447             i2=GetWndInfoNum(MdiInfo[i].path);
    1448             if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
    1449                 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
    1450                     PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pos;
    1451                     PointAndSize.size=ProjectInfo.pWindowInfo[i2].size;
    1452                     if(GetKeyState(VK_SHIFT)&0x8000){
    1453                         if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP)
    1454                             Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
    1455 
    1456                         if(wParam==VK_RIGHT)
    1457                             ProjectInfo.pWindowInfo[i2].size.cx++;
    1458                         else if(wParam==VK_LEFT)
    1459                             ProjectInfo.pWindowInfo[i2].size.cx--;
    1460                         else if(wParam==VK_DOWN)
    1461                             ProjectInfo.pWindowInfo[i2].size.cy++;
    1462                         else if(wParam==VK_UP)
    1463                             ProjectInfo.pWindowInfo[i2].size.cy--;
    1464 
    1465                         if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP){
    1466                             DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1467 
     1468            {
     1469                hParent=GetParent(hwnd);
     1470                i=GetWndNum(hParent);
     1471                i2=GetWndInfoNum(MdiInfo[i].path);
     1472                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     1473                if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
     1474                    if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
     1475                        PointAndSize.pos=pWindowInfo->pos;
     1476                        PointAndSize.size=pWindowInfo->size;
     1477                        if(GetKeyState(VK_SHIFT)&0x8000){
     1478                            if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP)
     1479                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
     1480
     1481                            if(wParam==VK_RIGHT)
     1482                                pWindowInfo->size.cx++;
     1483                            else if(wParam==VK_LEFT)
     1484                                pWindowInfo->size.cx--;
     1485                            else if(wParam==VK_DOWN)
     1486                                pWindowInfo->size.cy++;
     1487                            else if(wParam==VK_UP)
     1488                                pWindowInfo->size.cy--;
     1489
     1490                            if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP){
     1491                                DrawRadWindow(i,pWindowInfo);
     1492
     1493                                SetStatusText(NULL);
     1494
     1495                                //サポートダイアログの内容をセット
     1496                                SetSupportDlgData(i,i2);
     1497                            }
     1498                        }
     1499                    }
     1500                    else{
     1501                        PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
     1502                        PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
     1503                        if(wParam==VK_RIGHT){
     1504                            if(GetKeyState(VK_SHIFT)&0x8000){
     1505                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
     1506                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx++;
     1507                            }
     1508                            else{
     1509                                for(i3=0;;i3++){
     1510                                    if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
     1511                                    PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
     1512                                    PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
     1513                                    Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
     1514
     1515                                    pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x++;
     1516                                }
     1517                            }
     1518                            DrawRadWindow(i,pWindowInfo);
    14681519                            SetStatusText(NULL);
    14691520
     
    14711522                            SetSupportDlgData(i,i2);
    14721523                        }
     1524                        else if(wParam==VK_LEFT){
     1525                            if(GetKeyState(VK_SHIFT)&0x8000){
     1526                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
     1527                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx--;
     1528                            }
     1529                            else{
     1530                                for(i3=0;;i3++){
     1531                                    if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
     1532                                    PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
     1533                                    PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
     1534                                    Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
     1535
     1536                                    pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x--;
     1537                                }
     1538                            }
     1539                            DrawRadWindow(i,pWindowInfo);
     1540                            SetStatusText(NULL);
     1541
     1542                            //サポートダイアログの内容をセット
     1543                            SetSupportDlgData(i,i2);
     1544                        }
     1545                        else if(wParam==VK_UP){
     1546                            if(GetKeyState(VK_SHIFT)&0x8000){
     1547                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
     1548                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy--;
     1549                            }
     1550                            else{
     1551                                for(i3=0;;i3++){
     1552                                    if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
     1553                                    PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
     1554                                    PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
     1555                                    Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
     1556
     1557                                    pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y--;
     1558                                }
     1559                            }
     1560                            DrawRadWindow(i,pWindowInfo);
     1561                            SetStatusText(NULL);
     1562
     1563                            //サポートダイアログの内容をセット
     1564                            SetSupportDlgData(i,i2);
     1565                        }
     1566                        else if(wParam==VK_DOWN){
     1567                            if(GetKeyState(VK_SHIFT)&0x8000){
     1568                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
     1569                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy++;
     1570                            }
     1571                            else{
     1572                                for(i3=0;;i3++){
     1573                                    if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
     1574                                    PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
     1575                                    PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
     1576                                    Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
     1577
     1578                                    pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y++;
     1579                                }
     1580                            }
     1581                            DrawRadWindow(i,pWindowInfo);
     1582                            SetStatusText(NULL);
     1583
     1584                            //サポートダイアログの内容をセット
     1585                            SetSupportDlgData(i,i2);
     1586                        }
     1587                        else if(wParam==VK_DELETE)
     1588                            SendMessage(hwnd,WM_COMMAND,IDM_RAD_ITEM_DELETE,0);
    14731589                    }
    14741590                }
    1475                 else{
    1476                     PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
    1477                     PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
    1478                     if(wParam==VK_RIGHT){
    1479                         if(GetKeyState(VK_SHIFT)&0x8000){
    1480                             Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
    1481                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx++;
    1482                         }
    1483                         else{
    1484                             for(i3=0;;i3++){
    1485                                 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
    1486                                 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
    1487                                 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
    1488                                 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
    1489 
    1490                                 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x++;
    1491                             }
    1492                         }
    1493                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1494                         SetStatusText(NULL);
    1495 
    1496                         //サポートダイアログの内容をセット
    1497                         SetSupportDlgData(i,i2);
    1498                     }
    1499                     else if(wParam==VK_LEFT){
    1500                         if(GetKeyState(VK_SHIFT)&0x8000){
    1501                             Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
    1502                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx--;
    1503                         }
    1504                         else{
    1505                             for(i3=0;;i3++){
    1506                                 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
    1507                                 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
    1508                                 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
    1509                                 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
    1510 
    1511                                 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x--;
    1512                             }
    1513                         }
    1514                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1515                         SetStatusText(NULL);
    1516 
    1517                         //サポートダイアログの内容をセット
    1518                         SetSupportDlgData(i,i2);
    1519                     }
    1520                     else if(wParam==VK_UP){
    1521                         if(GetKeyState(VK_SHIFT)&0x8000){
    1522                             Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
    1523                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy--;
    1524                         }
    1525                         else{
    1526                             for(i3=0;;i3++){
    1527                                 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
    1528                                 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
    1529                                 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
    1530                                 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
    1531 
    1532                                 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y--;
    1533                             }
    1534                         }
    1535                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1536                         SetStatusText(NULL);
    1537 
    1538                         //サポートダイアログの内容をセット
    1539                         SetSupportDlgData(i,i2);
    1540                     }
    1541                     else if(wParam==VK_DOWN){
    1542                         if(GetKeyState(VK_SHIFT)&0x8000){
    1543                             Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
    1544                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy++;
    1545                         }
    1546                         else{
    1547                             for(i3=0;;i3++){
    1548                                 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
    1549                                 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
    1550                                 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
    1551                                 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
    1552 
    1553                                 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y++;
    1554                             }
    1555                         }
    1556                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1557                         SetStatusText(NULL);
    1558 
    1559                         //サポートダイアログの内容をセット
    1560                         SetSupportDlgData(i,i2);
    1561                     }
    1562                     else if(wParam==VK_DELETE)
    1563                         SendMessage(hwnd,WM_COMMAND,IDM_RAD_ITEM_DELETE,0);
    1564                 }
     1591                return 0;
    15651592            }
    1566             return 0;
    15671593        case WM_SETFOCUS:
    15681594            i=GetWndNum(GetParent(hwnd));
  • trunk/ab5.0/abdev/abdev/RadSupport.cpp

    r475 r609  
    3838    extern PROJECTINFO ProjectInfo;
    3939    static HWND hWnd;
    40     WINDOW_INFO *pWindowInfo;
    4140    HWND hChild;
    4241    HFONT *lphFont;
     
    5251    }
    5352
    54     pWindowInfo=&ProjectInfo.pWindowInfo[WndInfoNum];
     53    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
    5554
    5655    if(pWindowInfo->style&WS_CHILD){
     
    187186    hSupport=MdiInfo[WndNum].MdiRadInfo->hSupport;
    188187
     188    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     189
    189190    if(RadInfo.NowDragging>=FRAME_CHANGEPOS_START&&RadInfo.NowDragging<=FRAME_CHANGEPOS_END&&
    190191        (!(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]!=-1&&MdiInfo[WndNum].MdiRadInfo->SelectingItem[1]!=-1))){
     
    212213        SetDlgItemText(hSupport,IDC_YPOS,"");
    213214
    214         sprintf(temporary,"%d",ProjectInfo.pWindowInfo[WndInfoNum].size.cx);
     215        sprintf(temporary,"%d",pWindowInfo->size.cx);
    215216        SetDlgItemText(hSupport,IDC_WIDTH,temporary);
    216217
    217         sprintf(temporary,"%d",ProjectInfo.pWindowInfo[WndInfoNum].size.cy);
     218        sprintf(temporary,"%d",pWindowInfo->size.cy);
    218219        SetDlgItemText(hSupport,IDC_HEIGHT,temporary);
    219220    }
     
    239240            EnableWindow(GetDlgItem(hSupport,IDC_SPIN4),1);
    240241
    241             sprintf(temporary,"%d",ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x);
     242            sprintf(temporary,"%d",pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x);
    242243            SetDlgItemText(hSupport,IDC_XPOS,temporary);
    243244
    244             sprintf(temporary,"%d",ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y);
     245            sprintf(temporary,"%d",pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y);
    245246            SetDlgItemText(hSupport,IDC_YPOS,temporary);
    246247
    247             sprintf(temporary,"%d",ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cx);
     248            sprintf(temporary,"%d",pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cx);
    248249            SetDlgItemText(hSupport,IDC_WIDTH,temporary);
    249250
    250             sprintf(temporary,"%d",ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cy);
     251            sprintf(temporary,"%d",pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cy);
    251252            SetDlgItemText(hSupport,IDC_HEIGHT,temporary);
    252253        }
     
    260261    extern MDIINFO MdiInfo[MAX_WNDNUM];
    261262    static BOOL bTimer;
    262     int i,i2,i3;
     263    int i,i3;
    263264    char temporary[255];
    264265    POINTANDSIZE PointAndSize;
     
    305306
    306307            i=GetWndNum(GetParent(hwnd));
    307             i2=GetWndInfoNum(MdiInfo[i].path);
     308            WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    308309
    309310            for(i3=0;;i3++){
    310311                if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
    311                 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
    312                 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
     312                PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
     313                PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
    313314                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
    314315            }
     
    318319                for(i3=0;;i3++){
    319320                    if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
    320                     ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x=atol(temporary);
     321                    pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x=atol(temporary);
    321322                }
    322323            }
     
    326327                for(i3=0;;i3++){
    327328                    if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
    328                     ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y=atol(temporary);
     329                    pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y=atol(temporary);
    329330                }
    330331            }
     
    333334            if(temporary[0]){
    334335                if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
    335                     ProjectInfo.pWindowInfo[i2].size.cx=atol(temporary);
     336                    pWindowInfo->size.cx=atol(temporary);
    336337                else{
    337338                    for(i3=0;;i3++){
    338339                        if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
    339                         ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx=atol(temporary);
     340                        pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx=atol(temporary);
    340341                    }
    341342                }
     
    345346            if(temporary[0]){
    346347                if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
    347                     ProjectInfo.pWindowInfo[i2].size.cy=atol(temporary);
     348                    pWindowInfo->size.cy=atol(temporary);
    348349                else{
    349350                    for(i3=0;;i3++){
    350351                        if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
    351                         ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy=atol(temporary);
     352                        pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy=atol(temporary);
    352353                    }
    353354                }
     
    355356
    356357            //描画
    357             DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     358            DrawRadWindow(i,pWindowInfo);
    358359
    359360            //スクロールバーをリセット
  • trunk/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp

    r475 r609  
    356356    extern MDIINFO MdiInfo[MAX_WNDNUM];
    357357    extern PROJECTINFO ProjectInfo;
    358     int i,i2,i3;
     358    int i,i3;
    359359    char temporary[MAX_PATH],temp2[MAX_PATH];
    360360    switch(message){
    361361        case WM_INITDIALOG:
    362             SetPosCenter(hwnd);
    363             i=GetWndNum(GetWindow(hClient,GW_CHILD));
    364             i2=GetWndInfoNum(MdiInfo[i].path);
    365             sprintf(temporary,"h%s",ProjectInfo.pWindowInfo[i2].name);
    366             sprintf(temp2,"%sProc",ProjectInfo.pWindowInfo[i2].name);
    367             if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].HandleName)==0&&
    368                 lstrcmp(temp2,ProjectInfo.pWindowInfo[i2].CallBackName)==0){
    369                 SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_SETCHECK,BST_CHECKED,0);
    370                 SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);
    371             }
    372             SetDlgItemText(hwnd,IDC_WINDOWNAME,ProjectInfo.pWindowInfo[i2].name);
    373             SetDlgItemText(hwnd,IDC_WINDOWHANDLE,ProjectInfo.pWindowInfo[i2].HandleName);
    374             SetDlgItemText(hwnd,IDC_WINDOWPROC,ProjectInfo.pWindowInfo[i2].CallBackName);
    375             break;
     362            {
     363                SetPosCenter(hwnd);
     364                i=GetWndNum(GetWindow(hClient,GW_CHILD));
     365                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     366                sprintf(temporary,"h%s",pWindowInfo->name);
     367                sprintf(temp2,"%sProc",pWindowInfo->name);
     368                if(lstrcmp(temporary,pWindowInfo->HandleName)==0&&
     369                    lstrcmp(temp2,pWindowInfo->CallBackName)==0){
     370                    SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_SETCHECK,BST_CHECKED,0);
     371                    SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);
     372                }
     373                SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name);
     374                SetDlgItemText(hwnd,IDC_WINDOWHANDLE,pWindowInfo->HandleName);
     375                SetDlgItemText(hwnd,IDC_WINDOWPROC,pWindowInfo->CallBackName);
     376                break;
     377            }
    376378        case WM_COMMAND:
    377379            switch(LOWORD(wParam)){
    378380                case IDOK:
    379                     if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))==0){
    380                         //MsgBox "ウィンドウ識別名を入力して下さい。"
    381                         MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_WINDOWNAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
    382                         break;
    383                     }
    384                     if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))==0){
    385                         //MsgBox "ハンドル名を入力して下さい。"
    386                         MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_HANDLENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
    387                         break;
    388                     }
    389                     if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))==0){
    390                         //MsgBox "プロシージャ名を入力して下さい。"
    391                         MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_PROCEDURENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
    392                         break;
    393                     }
    394 
    395                     i=GetWndNum(GetWindow(hClient,GW_CHILD));
    396                     i2=GetWndInfoNum(MdiInfo[i].path);
    397 
    398                     RAD_UNDOSTATE_NAME names,NoticeNames;
    399                     i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))+1;
    400                     names.name=(char *)HeapAlloc(hHeap,0,i3);
    401                     GetDlgItemText(hwnd,IDC_WINDOWNAME,names.name,i3);
    402 
    403                     i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))+1;
    404                     names.HandleName=(char *)HeapAlloc(hHeap,0,i3);
    405                     GetDlgItemText(hwnd,IDC_WINDOWHANDLE,names.HandleName,i3);
    406 
    407                     i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))+1;
    408                     names.CallBackName=(char *)HeapAlloc(hHeap,0,i3);
    409                     GetDlgItemText(hwnd,IDC_WINDOWPROC,names.CallBackName,i3);
    410 
    411                     if(lstrcmp(names.name,ProjectInfo.pWindowInfo[i2].name)==0&&
    412                         lstrcmp(names.HandleName,ProjectInfo.pWindowInfo[i2].HandleName)==0&&
    413                         lstrcmp(names.CallBackName,ProjectInfo.pWindowInfo[i2].CallBackName)==0){
    414                         HeapDefaultFree(names.name);
    415                         HeapDefaultFree(names.HandleName);
    416                         HeapDefaultFree(names.CallBackName);
    417                         SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
     381                    {
     382                        if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))==0){
     383                            //MsgBox "ウィンドウ識別名を入力して下さい。"
     384                            MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_WINDOWNAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
     385                            break;
     386                        }
     387                        if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))==0){
     388                            //MsgBox "ハンドル名を入力して下さい。"
     389                            MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_HANDLENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
     390                            break;
     391                        }
     392                        if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))==0){
     393                            //MsgBox "プロシージャ名を入力して下さい。"
     394                            MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_PROCEDURENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
     395                            break;
     396                        }
     397
     398                        i=GetWndNum(GetWindow(hClient,GW_CHILD));
     399                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     400
     401                        RAD_UNDOSTATE_NAME names,NoticeNames;
     402                        i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))+1;
     403                        names.name=(char *)HeapAlloc(hHeap,0,i3);
     404                        GetDlgItemText(hwnd,IDC_WINDOWNAME,names.name,i3);
     405
     406                        i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))+1;
     407                        names.HandleName=(char *)HeapAlloc(hHeap,0,i3);
     408                        GetDlgItemText(hwnd,IDC_WINDOWHANDLE,names.HandleName,i3);
     409
     410                        i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))+1;
     411                        names.CallBackName=(char *)HeapAlloc(hHeap,0,i3);
     412                        GetDlgItemText(hwnd,IDC_WINDOWPROC,names.CallBackName,i3);
     413
     414                        if(lstrcmp(names.name,pWindowInfo->name)==0&&
     415                            lstrcmp(names.HandleName,pWindowInfo->HandleName)==0&&
     416                            lstrcmp(names.CallBackName,pWindowInfo->CallBackName)==0){
     417                            HeapDefaultFree(names.name);
     418                            HeapDefaultFree(names.HandleName);
     419                            HeapDefaultFree(names.CallBackName);
     420                            SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
     421                            return 1;
     422                        }
     423
     424                        //MsgBox "これらのウィンドウ識別名を変更すると、ソースコード内の識別子は手動で変換する必要があります。変更しますか?"
     425                        if(IDCANCEL==MessageBox(hwnd,STRING_WINDOW_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
     426
     427                        //変更情報を更新
     428                        NoticeNames.name=pWindowInfo->name;
     429                        NoticeNames.HandleName=pWindowInfo->HandleName;
     430                        NoticeNames.CallBackName=pWindowInfo->CallBackName;
     431                        Rad_NoticeChanging(i,RAD_UNDO_NAME,SELECT_WINDOW,(DWORD)&NoticeNames);
     432
     433                        HeapDefaultFree(pWindowInfo->name);
     434                        pWindowInfo->name=names.name;
     435                        GlobalFree(MdiInfo[i].path);
     436                        MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(names.name));
     437                        lstrcpy(MdiInfo[i].path,names.name);
     438
     439                        HeapDefaultFree(pWindowInfo->HandleName);
     440                        pWindowInfo->HandleName=names.HandleName;
     441
     442                        HeapDefaultFree(pWindowInfo->CallBackName);
     443                        pWindowInfo->CallBackName=names.CallBackName;
     444
     445                        EndDialog(hwnd,1);
    418446                        return 1;
    419447                    }
    420 
    421                     //MsgBox "これらのウィンドウ識別名を変更すると、ソースコード内の識別子は手動で変換する必要があります。変更しますか?"
    422                     if(IDCANCEL==MessageBox(hwnd,STRING_WINDOW_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
    423 
    424                     //変更情報を更新
    425                     NoticeNames.name=ProjectInfo.pWindowInfo[i2].name;
    426                     NoticeNames.HandleName=ProjectInfo.pWindowInfo[i2].HandleName;
    427                     NoticeNames.CallBackName=ProjectInfo.pWindowInfo[i2].CallBackName;
    428                     Rad_NoticeChanging(i,RAD_UNDO_NAME,SELECT_WINDOW,(DWORD)&NoticeNames);
    429 
    430                     HeapDefaultFree(ProjectInfo.pWindowInfo[i2].name);
    431                     ProjectInfo.pWindowInfo[i2].name=names.name;
    432                     GlobalFree(MdiInfo[i].path);
    433                     MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(names.name));
    434                     lstrcpy(MdiInfo[i].path,names.name);
    435 
    436                     HeapDefaultFree(ProjectInfo.pWindowInfo[i2].HandleName);
    437                     ProjectInfo.pWindowInfo[i2].HandleName=names.HandleName;
    438 
    439                     HeapDefaultFree(ProjectInfo.pWindowInfo[i2].CallBackName);
    440                     ProjectInfo.pWindowInfo[i2].CallBackName=names.CallBackName;
    441 
    442                     EndDialog(hwnd,1);
    443                     return 1;
    444448                case IDCANCEL:
    445449                    EndDialog(hwnd,0);
     
    477481    extern MDIINFO MdiInfo[MAX_WNDNUM];
    478482    extern PROJECTINFO ProjectInfo;
    479     int i,i2;
     483    int i;
    480484
    481485    switch(message){
    482486        case WM_INITDIALOG:
    483             SetPosCenter(hwnd);
    484             i=GetWndNum(GetWindow(hClient,GW_CHILD));
    485             i2=GetWndInfoNum(MdiInfo[i].path);
    486             if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_TOPMOST) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_SETCHECK,BST_CHECKED,0);
    487             if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
    488             if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
    489             if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_TOOLWINDOW) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_SETCHECK,BST_CHECKED,0);
    490             if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
    491             if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
    492             if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_NOPARENTNOTIFY) SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_SETCHECK,BST_CHECKED,0);
    493             if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_CONTEXTHELP) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_SETCHECK,BST_CHECKED,0);
    494             if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_CONTROLPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_SETCHECK,BST_CHECKED,0);
    495             break;
     487            {
     488                SetPosCenter(hwnd);
     489                i=GetWndNum(GetWindow(hClient,GW_CHILD));
     490                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     491                if(pWindowInfo->ExStyle&WS_EX_TOPMOST) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_SETCHECK,BST_CHECKED,0);
     492                if(pWindowInfo->ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
     493                if(pWindowInfo->ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
     494                if(pWindowInfo->ExStyle&WS_EX_TOOLWINDOW) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_SETCHECK,BST_CHECKED,0);
     495                if(pWindowInfo->ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
     496                if(pWindowInfo->ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
     497                if(pWindowInfo->ExStyle&WS_EX_NOPARENTNOTIFY) SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_SETCHECK,BST_CHECKED,0);
     498                if(pWindowInfo->ExStyle&WS_EX_CONTEXTHELP) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_SETCHECK,BST_CHECKED,0);
     499                if(pWindowInfo->ExStyle&WS_EX_CONTROLPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_SETCHECK,BST_CHECKED,0);
     500                break;
     501            }
    496502        case WM_COMMAND:
    497503            switch(LOWORD(wParam)){
    498504                case IDOK:
    499                     i=GetWndNum(GetWindow(hClient,GW_CHILD));
    500                     i2=GetWndInfoNum(MdiInfo[i].path);
    501 
    502                     DWORD style;
    503                     style=0;
    504                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_GETCHECK,0,0))
    505                         style|=WS_EX_TOPMOST;
    506                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
    507                         style|=WS_EX_ACCEPTFILES;
    508                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
    509                         style|=WS_EX_TRANSPARENT;
    510                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_GETCHECK,0,0))
    511                         style|=WS_EX_TOOLWINDOW;
    512                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
    513                         style|=WS_EX_CLIENTEDGE;
    514                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
    515                         style|=WS_EX_STATICEDGE;
    516                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_GETCHECK,0,0))
    517                         style|=WS_EX_NOPARENTNOTIFY;
    518                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_GETCHECK,0,0))
    519                         style|=WS_EX_CONTEXTHELP;
    520                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_GETCHECK,0,0))
    521                         style|=WS_EX_CONTROLPARENT;
    522 
    523                     if(style==ProjectInfo.pWindowInfo[i2].ExStyle){
    524                         SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
     505                    {
     506                        i=GetWndNum(GetWindow(hClient,GW_CHILD));
     507
     508                        DWORD style;
     509                        style=0;
     510                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_GETCHECK,0,0))
     511                            style|=WS_EX_TOPMOST;
     512                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
     513                            style|=WS_EX_ACCEPTFILES;
     514                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
     515                            style|=WS_EX_TRANSPARENT;
     516                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_GETCHECK,0,0))
     517                            style|=WS_EX_TOOLWINDOW;
     518                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
     519                            style|=WS_EX_CLIENTEDGE;
     520                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
     521                            style|=WS_EX_STATICEDGE;
     522                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_GETCHECK,0,0))
     523                            style|=WS_EX_NOPARENTNOTIFY;
     524                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_GETCHECK,0,0))
     525                            style|=WS_EX_CONTEXTHELP;
     526                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_GETCHECK,0,0))
     527                            style|=WS_EX_CONTROLPARENT;
     528
     529                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     530
     531                        if(style==pWindowInfo->ExStyle){
     532                            SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
     533                            return 1;
     534                        }
     535
     536                        //変更情報
     537                        Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,SELECT_WINDOW,pWindowInfo->ExStyle);
     538
     539                        pWindowInfo->ExStyle=style;
     540                        EndDialog(hwnd,1);
    525541                        return 1;
    526542                    }
    527 
    528                     //変更情報
    529                     Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].ExStyle);
    530 
    531                     ProjectInfo.pWindowInfo[i2].ExStyle=style;
    532                     EndDialog(hwnd,1);
    533                     return 1;
    534543                case IDCANCEL:
    535544                    EndDialog(hwnd,0);
     
    544553    extern MDIINFO MdiInfo[MAX_WNDNUM];
    545554    extern PROJECTINFO ProjectInfo;
    546     int i,i2,i3,i4;
     555    int i,i3,i4;
    547556    static BOOL bInitial;
    548557
    549558    switch(message){
    550559        case WM_INITDIALOG:
    551             bInitial=1;
    552             i=GetWndNum(GetParent(GetParent(hwnd)));
    553             i2=GetWndInfoNum(MdiInfo[i].path);
    554 
    555             SetDlgItemText(hwnd,IDC_WINDOWNAME,ProjectInfo.pWindowInfo[i2].name);
    556             SetDlgItemText(hwnd,IDC_HANDLE,ProjectInfo.pWindowInfo[i2].HandleName);
    557             SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].caption);
    558 
    559             //"3D FACE(標準)"
    560             SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR1);
    561             //"色指定"
    562             SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR2);
    563 
    564             for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++)
    565                 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
    566             if(ProjectInfo.pWindowInfo[i2].type==WNDTYPE_MODALDLG||
    567                 ProjectInfo.pWindowInfo[i2].type==WNDTYPE_MODELESSDLG){
    568                 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
    569                 EnableWindow(GetDlgItem(hwnd,IDC_BGCOLOR),0);
    570             }
    571             else{
    572                 if(ProjectInfo.pWindowInfo[i2].bgColor==COLOR_3DFACE){
    573                     //3DFACE
     560            {
     561                bInitial=1;
     562                i=GetWndNum(GetParent(GetParent(hwnd)));
     563                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     564
     565                SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name);
     566                SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->HandleName);
     567                SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
     568
     569                //"3D FACE(標準)"
     570                SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR1);
     571                //"色指定"
     572                SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR2);
     573
     574                for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++)
     575                    SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
     576                if(pWindowInfo->type==WNDTYPE_MODALDLG||
     577                    pWindowInfo->type==WNDTYPE_MODELESSDLG){
    574578                    SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
     579                    EnableWindow(GetDlgItem(hwnd,IDC_BGCOLOR),0);
    575580                }
    576                 else if(ProjectInfo.pWindowInfo[i2].bgColor<=0){
    577                     //色指定
    578                     SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0);
     581                else{
     582                    if(pWindowInfo->bgColor==COLOR_3DFACE){
     583                        //3DFACE
     584                        SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
     585                    }
     586                    else if(pWindowInfo->bgColor<=0){
     587                        //色指定
     588                        SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0);
     589                    }
     590                    else if(pWindowInfo->bgColor>=0x1000){
     591                        //ビットマップ指定
     592                        SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+pWindowInfo->bgColor-0x1000,0);
     593                    }
    579594                }
    580                 else if(ProjectInfo.pWindowInfo[i2].bgColor>=0x1000){
    581                     //ビットマップ指定
    582                     SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+ProjectInfo.pWindowInfo[i2].bgColor-0x1000,0);
     595
     596
     597                ////////////
     598                // メニュー
     599                ////////////
     600
     601                //"なし"
     602                SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)STRING_NONE_);
     603
     604                for(i3=0,i4=0;i3<ProjectInfo.NumberOfMenu;i3++){
     605                    if(pWindowInfo->MenuID){
     606                        if(lstrcmpi(ProjectInfo.pMenuInfo[i3].IdName,pWindowInfo->MenuID)==0)
     607                            i4=i3+1;
     608                    }
     609                    SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)ProjectInfo.pMenuInfo[i3].IdName);
    583610                }
    584             }
    585 
    586 
    587             ////////////
    588             // メニュー
    589             ////////////
    590 
    591             //"なし"
    592             SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)STRING_NONE_);
    593 
    594             for(i3=0,i4=0;i3<ProjectInfo.NumberOfMenu;i3++){
    595                 if(ProjectInfo.pWindowInfo[i2].MenuID){
    596                     if(lstrcmpi(ProjectInfo.pMenuInfo[i3].IdName,ProjectInfo.pWindowInfo[i2].MenuID)==0)
     611                if(i4==0&&pWindowInfo->MenuID){
     612                    //メニューが存在しない場合、無効にする
     613                    HeapDefaultFree(pWindowInfo->MenuID);
     614                    pWindowInfo->MenuID=0;
     615                    DrawRadWindow(i,pWindowInfo);
     616                }
     617                SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_SETCURSEL,i4,0);
     618
     619
     620                ////////////
     621                // アイコン
     622                ////////////
     623
     624                //"Windowsロゴ(標準)"
     625                SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_ICONDEFAULT);
     626
     627                for(i3=0,i4=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){
     628                    SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
     629
     630                    if(lstrcmp(pWindowInfo->IconResName,ProjectInfo.res.pIconResInfo[i3].IdName)==0)
    597631                        i4=i3+1;
    598632                }
    599                 SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)ProjectInfo.pMenuInfo[i3].IdName);
    600             }
    601             if(i4==0&&ProjectInfo.pWindowInfo[i2].MenuID){
    602                 //メニューが存在しない場合、無効にする
    603                 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].MenuID);
    604                 ProjectInfo.pWindowInfo[i2].MenuID=0;
    605                 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    606             }
    607             SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_SETCURSEL,i4,0);
    608 
    609 
    610             ////////////
    611             // アイコン
    612             ////////////
    613 
    614             //"Windowsロゴ(標準)"
    615             SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_ICONDEFAULT);
    616 
    617             for(i3=0,i4=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){
    618                 SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
    619 
    620                 if(lstrcmp(ProjectInfo.pWindowInfo[i2].IconResName,ProjectInfo.res.pIconResInfo[i3].IdName)==0)
    621                     i4=i3+1;
    622             }
    623             if(i4==0&&ProjectInfo.pWindowInfo[i2].IconResName){
    624                 //アイコンが存在しない場合、無効にする
    625                 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].IconResName);
    626                 ProjectInfo.pWindowInfo[i2].IconResName=0;
    627                 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    628             }
    629             SendDlgItemMessage(hwnd,IDC_ICONRES,CB_SETCURSEL,i4,0);
    630 
    631 
    632             ////////////
    633             // スタイル
    634             ////////////
    635 
    636             //"オーバーラップ"
    637             SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_OVERLAPPED);
    638             //"ポップアップ"
    639             SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_POPUP);
    640             //"チャイルド"
    641             SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_CHILD);
    642 
    643             if(ProjectInfo.pWindowInfo[i2].style&WS_POPUP) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,1,0);
    644             else if(ProjectInfo.pWindowInfo[i2].style&WS_CHILD) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,2,0);
    645             else SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,0,0);
    646 
    647             //"枠なし"
    648             SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_NONE);
    649             //"細枠"
    650             SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_THICK);
    651             //"サイズ変更枠"
    652             SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_BORDER);
    653 
    654             //WS_CAPTION(WS_BORDER含む)を考慮してWS_THICKFRAMEを最初に比較する
    655             if(ProjectInfo.pWindowInfo[i2].style&WS_THICKFRAME) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,2,0);
    656             else if(ProjectInfo.pWindowInfo[i2].style&WS_BORDER) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,1,0);
    657             else SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,0,0);
    658 
    659             if(ProjectInfo.pWindowInfo[i2].style&WS_CAPTION) SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
    660             if(ProjectInfo.pWindowInfo[i2].style&WS_SYSMENU) SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_SETCHECK,BST_CHECKED,0);
    661             if(ProjectInfo.pWindowInfo[i2].style&WS_MINIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
    662             if(ProjectInfo.pWindowInfo[i2].style&WS_MAXIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
    663             if(ProjectInfo.pWindowInfo[i2].style&WS_MINIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_SETCHECK,BST_CHECKED,0);
    664             if(ProjectInfo.pWindowInfo[i2].style&WS_MAXIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_SETCHECK,BST_CHECKED,0);
    665             if(ProjectInfo.pWindowInfo[i2].style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
    666             if(ProjectInfo.pWindowInfo[i2].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
    667             if(ProjectInfo.pWindowInfo[i2].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
    668             if(ProjectInfo.pWindowInfo[i2].style&WS_CLIPSIBLINGS) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_SETCHECK,BST_CHECKED,0);
    669             if(ProjectInfo.pWindowInfo[i2].style&WS_CLIPCHILDREN) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_SETCHECK,BST_CHECKED,0);
    670             if(ProjectInfo.pWindowInfo[i2].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
    671 
    672             SetDlgItemText(hwnd,IDC_SETFONT,ProjectInfo.pWindowInfo[i2].LogFont.lfFaceName);
    673 
    674             RadProperty_Window_Window_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].style);
    675 
    676 
    677             //////////
    678             //タイプ
    679             switch(ProjectInfo.pWindowInfo[i2].type){
    680                 case WNDTYPE_DEFAULT:
    681                     SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_SETCHECK,BST_CHECKED,0);
    682                     break;
    683                 case WNDTYPE_MODALDLG:
    684                     SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_SETCHECK,BST_CHECKED,0);
    685                     break;
    686                 case WNDTYPE_MODELESSDLG:
    687                     SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_SETCHECK,BST_CHECKED,0);
    688                     break;
    689             }
    690 
    691 
    692             bInitial=0;
    693             break;
     633                if(i4==0&&pWindowInfo->IconResName){
     634                    //アイコンが存在しない場合、無効にする
     635                    HeapDefaultFree(pWindowInfo->IconResName);
     636                    pWindowInfo->IconResName=0;
     637                    DrawRadWindow(i,pWindowInfo);
     638                }
     639                SendDlgItemMessage(hwnd,IDC_ICONRES,CB_SETCURSEL,i4,0);
     640
     641
     642                ////////////
     643                // スタイル
     644                ////////////
     645
     646                //"オーバーラップ"
     647                SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_OVERLAPPED);
     648                //"ポップアップ"
     649                SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_POPUP);
     650                //"チャイルド"
     651                SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_CHILD);
     652
     653                if(pWindowInfo->style&WS_POPUP) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,1,0);
     654                else if(pWindowInfo->style&WS_CHILD) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,2,0);
     655                else SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,0,0);
     656
     657                //"枠なし"
     658                SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_NONE);
     659                //"細枠"
     660                SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_THICK);
     661                //"サイズ変更枠"
     662                SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_BORDER);
     663
     664                //WS_CAPTION(WS_BORDER含む)を考慮してWS_THICKFRAMEを最初に比較する
     665                if(pWindowInfo->style&WS_THICKFRAME) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,2,0);
     666                else if(pWindowInfo->style&WS_BORDER) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,1,0);
     667                else SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,0,0);
     668
     669                if(pWindowInfo->style&WS_CAPTION) SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
     670                if(pWindowInfo->style&WS_SYSMENU) SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_SETCHECK,BST_CHECKED,0);
     671                if(pWindowInfo->style&WS_MINIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
     672                if(pWindowInfo->style&WS_MAXIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
     673                if(pWindowInfo->style&WS_MINIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_SETCHECK,BST_CHECKED,0);
     674                if(pWindowInfo->style&WS_MAXIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_SETCHECK,BST_CHECKED,0);
     675                if(pWindowInfo->style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
     676                if(pWindowInfo->style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
     677                if(pWindowInfo->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
     678                if(pWindowInfo->style&WS_CLIPSIBLINGS) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_SETCHECK,BST_CHECKED,0);
     679                if(pWindowInfo->style&WS_CLIPCHILDREN) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_SETCHECK,BST_CHECKED,0);
     680                if(pWindowInfo->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
     681
     682                SetDlgItemText(hwnd,IDC_SETFONT,pWindowInfo->LogFont.lfFaceName);
     683
     684                RadProperty_Window_Window_StylingOrder(hwnd,&pWindowInfo->style);
     685
     686
     687                //////////
     688                //タイプ
     689                switch(pWindowInfo->type){
     690                    case WNDTYPE_DEFAULT:
     691                        SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_SETCHECK,BST_CHECKED,0);
     692                        break;
     693                    case WNDTYPE_MODALDLG:
     694                        SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_SETCHECK,BST_CHECKED,0);
     695                        break;
     696                    case WNDTYPE_MODELESSDLG:
     697                        SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_SETCHECK,BST_CHECKED,0);
     698                        break;
     699                }
     700
     701
     702                bInitial=0;
     703                break;
     704            }
    694705        case WM_COMMAND:
    695706            switch(LOWORD(wParam)){
    696707                case IDC_RENAMEWINDOW:
    697                     if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_RENAME),hwnd,(DLGPROC)DlgRadProperty_Window_Rename)) return 1;
    698                     i=GetWndNum(GetParent(GetParent(hwnd)));
    699                     i2=GetWndInfoNum(MdiInfo[i].path);
    700                     SetDlgItemText(hwnd,IDC_WINDOWNAME,ProjectInfo.pWindowInfo[i2].name);
    701                     SetDlgItemText(hwnd,IDC_HANDLE,ProjectInfo.pWindowInfo[i2].HandleName);
    702                     return 1;
     708                    {
     709                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_RENAME),hwnd,(DLGPROC)DlgRadProperty_Window_Rename)) return 1;
     710                        i=GetWndNum(GetParent(GetParent(hwnd)));
     711                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     712                        SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name);
     713                        SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->HandleName);
     714                        return 1;
     715                    }
    703716                case IDC_RENAMECAPTION:
    704                     if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1;
    705                     i=GetWndNum(GetParent(GetParent(hwnd)));
    706                     i2=GetWndInfoNum(MdiInfo[i].path);
    707                     SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].caption);
    708                     return 1;
     717                    {
     718                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1;
     719                        i=GetWndNum(GetParent(GetParent(hwnd)));
     720                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     721                        SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
     722                        return 1;
     723                    }
    709724                case IDC_SETFONT:
    710                     i=GetWndNum(GetParent(GetParent(hwnd)));
    711                     i2=GetWndInfoNum(MdiInfo[i].path);
    712                     LOGFONT lf;
    713                     lf=ProjectInfo.pWindowInfo[i2].LogFont;
    714                     if(!SetFontDialog(hwnd,&ProjectInfo.pWindowInfo[i2].LogFont,0)) return 1;
    715 
    716                     //変更情報
    717                     Rad_NoticeChanging(i,RAD_UNDO_FONT,SELECT_WINDOW,(DWORD)&lf);
    718 
    719                     SetDlgItemText(hwnd,IDC_SETFONT,ProjectInfo.pWindowInfo[i2].LogFont.lfFaceName);
    720                     DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    721                     return 1;
     725                    {
     726                        i=GetWndNum(GetParent(GetParent(hwnd)));
     727                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     728                        LOGFONT lf;
     729                        lf=pWindowInfo->LogFont;
     730                        if(!SetFontDialog(hwnd,&pWindowInfo->LogFont,0)) return 1;
     731
     732                        //変更情報
     733                        Rad_NoticeChanging(i,RAD_UNDO_FONT,SELECT_WINDOW,(DWORD)&lf);
     734
     735                        SetDlgItemText(hwnd,IDC_SETFONT,pWindowInfo->LogFont.lfFaceName);
     736                        DrawRadWindow(i,pWindowInfo);
     737                        return 1;
     738                    }
    722739                case IDC_BGCOLOR:
    723740                    if(HIWORD(wParam)==CBN_SELCHANGE){
    724741                        i=GetWndNum(GetParent(GetParent(hwnd)));
    725                         i2=GetWndInfoNum(MdiInfo[i].path);
     742                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    726743
    727744                        i3=SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_GETCURSEL,0,0);
     
    730747
    731748                            //変更情報
    732                             Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].bgColor);
    733 
    734                             ProjectInfo.pWindowInfo[i2].bgColor=COLOR_3DFACE;
     749                            Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
     750
     751                            pWindowInfo->bgColor=COLOR_3DFACE;
    735752                        }
    736753                        else if(i3==1){
     
    756773                            cc.lStructSize=sizeof(CHOOSECOLOR);
    757774                            cc.hwndOwner=hwnd;
    758                             if(ProjectInfo.pWindowInfo[i2].bgColor<=0)
    759                                 cc.rgbResult=-ProjectInfo.pWindowInfo[i2].bgColor;
     775                            if(pWindowInfo->bgColor<=0)
     776                                cc.rgbResult=-pWindowInfo->bgColor;
    760777                            else cc.rgbResult=RGB(255,255,255);
    761778                            cc.lpCustColors=CusColors;
     
    763780                            if(!ChooseColor(&cc)){
    764781                                //キャンセル動作
    765                                 if(ProjectInfo.pWindowInfo[i2].bgColor==COLOR_3DFACE){
     782                                if(pWindowInfo->bgColor==COLOR_3DFACE){
    766783                                    //3DFACE
    767784                                    SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
    768785                                }
    769                                 else if(ProjectInfo.pWindowInfo[i2].bgColor<=0){
     786                                else if(pWindowInfo->bgColor<=0){
    770787                                    //色指定
    771788                                    SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0);
    772789                                }
    773                                 else if(ProjectInfo.pWindowInfo[i2].bgColor>=0x1000){
     790                                else if(pWindowInfo->bgColor>=0x1000){
    774791                                    //ビットマップ指定
    775                                     SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+ProjectInfo.pWindowInfo[i2].bgColor-0x1000,0);
     792                                    SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+pWindowInfo->bgColor-0x1000,0);
    776793                                }
    777794                                return 1;
     
    779796
    780797                            //変更情報
    781                             Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].bgColor);
    782 
    783                             ProjectInfo.pWindowInfo[i2].bgColor=-(int)cc.rgbResult;
     798                            Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
     799
     800                            pWindowInfo->bgColor=-(int)cc.rgbResult;
    784801                        }
    785802                        else{
     
    788805
    789806                            //変更情報
    790                             Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].bgColor);
    791 
    792                             ProjectInfo.pWindowInfo[i2].bgColor=0x1000+i3;
    793                         }
    794                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     807                            Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
     808
     809                            pWindowInfo->bgColor=0x1000+i3;
     810                        }
     811                        DrawRadWindow(i,pWindowInfo);
    795812                        return 1;
    796813                    }
     
    799816                    if(HIWORD(wParam)==CBN_SELCHANGE){
    800817                        i=GetWndNum(GetParent(GetParent(hwnd)));
    801                         i2=GetWndInfoNum(MdiInfo[i].path);
     818                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    802819
    803820                        //変更情報
    804                         Rad_NoticeChanging(i,RAD_UNDO_WINDOWMENU,SELECT_WINDOW,(long)ProjectInfo.pWindowInfo[i2].MenuID);
     821                        Rad_NoticeChanging(i,RAD_UNDO_WINDOWMENU,SELECT_WINDOW,(long)pWindowInfo->MenuID);
    805822
    806823                        i3=SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETCURSEL,0,0);
    807                         if(ProjectInfo.pWindowInfo[i2].MenuID)
    808                             HeapDefaultFree(ProjectInfo.pWindowInfo[i2].MenuID);
    809                         if(i3==0) ProjectInfo.pWindowInfo[i2].MenuID=0;
     824                        if(pWindowInfo->MenuID)
     825                            HeapDefaultFree(pWindowInfo->MenuID);
     826                        if(i3==0) pWindowInfo->MenuID=0;
    810827                        else{
    811                             ProjectInfo.pWindowInfo[i2].MenuID=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXTLEN,i3,0)+1);
    812                             SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXT,i3,(long)ProjectInfo.pWindowInfo[i2].MenuID);
    813                         }
    814                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     828                            pWindowInfo->MenuID=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXTLEN,i3,0)+1);
     829                            SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXT,i3,(long)pWindowInfo->MenuID);
     830                        }
     831                        DrawRadWindow(i,pWindowInfo);
    815832                        return 1;
    816833                    }
     
    819836                    if(HIWORD(wParam)==CBN_SELCHANGE){
    820837                        i=GetWndNum(GetParent(GetParent(hwnd)));
    821                         i2=GetWndInfoNum(MdiInfo[i].path);
     838                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    822839
    823840                        //変更情報
    824                         Rad_NoticeChanging(i,RAD_UNDO_ICONRES,SELECT_WINDOW,(long)ProjectInfo.pWindowInfo[i2].IconResName);
     841                        Rad_NoticeChanging(i,RAD_UNDO_ICONRES,SELECT_WINDOW,(long)pWindowInfo->IconResName);
    825842
    826843                        i3=SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETCURSEL,0,0);
    827                         if(ProjectInfo.pWindowInfo[i2].IconResName)
    828                             HeapDefaultFree(ProjectInfo.pWindowInfo[i2].IconResName);
    829                         if(i3==0) ProjectInfo.pWindowInfo[i2].IconResName=0;
     844                        if(pWindowInfo->IconResName)
     845                            HeapDefaultFree(pWindowInfo->IconResName);
     846                        if(i3==0) pWindowInfo->IconResName=0;
    830847                        else{
    831                             ProjectInfo.pWindowInfo[i2].IconResName=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXTLEN,i3,0)+1);
    832                             SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXT,i3,(long)ProjectInfo.pWindowInfo[i2].IconResName);
    833                         }
    834                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     848                            pWindowInfo->IconResName=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXTLEN,i3,0)+1);
     849                            SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXT,i3,(long)pWindowInfo->IconResName);
     850                        }
     851                        DrawRadWindow(i,pWindowInfo);
    835852                        return 1;
    836853                    }
     
    840857                    if(HIWORD(wParam)==CBN_SELCHANGE){
    841858                        i=GetWndNum(GetParent(GetParent(hwnd)));
    842                         i2=GetWndInfoNum(MdiInfo[i].path);
     859                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    843860
    844861                        //変更情報
    845                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     862                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    846863
    847864                        i3=SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_GETCURSEL,0,0);
    848                         ProjectInfo.pWindowInfo[i2].style&=0x3FFFFFFF;
    849                         if(i3==1) ProjectInfo.pWindowInfo[i2].style|=WS_POPUP;
    850                         else if(i3==2) ProjectInfo.pWindowInfo[i2].style|=WS_CHILD;
    851                         RadProperty_Window_Window_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].style);
    852                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     865                        pWindowInfo->style&=0x3FFFFFFF;
     866                        if(i3==1) pWindowInfo->style|=WS_POPUP;
     867                        else if(i3==2) pWindowInfo->style|=WS_CHILD;
     868                        RadProperty_Window_Window_StylingOrder(hwnd,&pWindowInfo->style);
     869                        DrawRadWindow(i,pWindowInfo);
    853870                        return 1;
    854871                    }
     
    857874                    if(HIWORD(wParam)==CBN_SELCHANGE){
    858875                        i=GetWndNum(GetParent(GetParent(hwnd)));
    859                         i2=GetWndInfoNum(MdiInfo[i].path);
     876                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    860877
    861878                        //変更情報
    862                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     879                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    863880
    864881                        i3=SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_GETCURSEL,0,0);
    865                         ProjectInfo.pWindowInfo[i2].style&=~(WS_BORDER|WS_THICKFRAME);
    866                         if(i3==1) ProjectInfo.pWindowInfo[i2].style|=WS_BORDER;
     882                        pWindowInfo->style&=~(WS_BORDER|WS_THICKFRAME);
     883                        if(i3==1) pWindowInfo->style|=WS_BORDER;
    867884                        else if(i3==2){
    868                             ProjectInfo.pWindowInfo[i2].style|=WS_BORDER;
    869                             ProjectInfo.pWindowInfo[i2].style|=WS_THICKFRAME;
    870                         }
    871                         RadProperty_Window_Border_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].style);
    872                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     885                            pWindowInfo->style|=WS_BORDER;
     886                            pWindowInfo->style|=WS_THICKFRAME;
     887                        }
     888                        RadProperty_Window_Border_StylingOrder(hwnd,&pWindowInfo->style);
     889                        DrawRadWindow(i,pWindowInfo);
    873890                        return 1;
    874891                    }
     
    878895                    if(HIWORD(wParam)==BN_CLICKED){
    879896                        i=GetWndNum(GetParent(GetParent(hwnd)));
    880                         i2=GetWndInfoNum(MdiInfo[i].path);
     897                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    881898
    882899                        //変更情報
    883                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     900                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    884901
    885902                        if(SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_GETCHECK,0,0))
    886                             ProjectInfo.pWindowInfo[i2].style|=WS_CAPTION;
     903                            pWindowInfo->style|=WS_CAPTION;
    887904                        else
    888                             ProjectInfo.pWindowInfo[i2].style&=~WS_CAPTION;
    889                         RadProperty_Window_Caption_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].style);
    890                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     905                            pWindowInfo->style&=~WS_CAPTION;
     906                        RadProperty_Window_Caption_StylingOrder(hwnd,&pWindowInfo->style);
     907                        DrawRadWindow(i,pWindowInfo);
    891908                        return 1;
    892909                    }
     
    895912                    if(HIWORD(wParam)==BN_CLICKED){
    896913                        i=GetWndNum(GetParent(GetParent(hwnd)));
    897                         i2=GetWndInfoNum(MdiInfo[i].path);
     914                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    898915
    899916                        //変更情報
    900                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     917                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    901918
    902919                        if(SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_GETCHECK,0,0))
    903                             ProjectInfo.pWindowInfo[i2].style|=WS_SYSMENU;
     920                            pWindowInfo->style|=WS_SYSMENU;
    904921                        else
    905                             ProjectInfo.pWindowInfo[i2].style&=~WS_SYSMENU;
    906                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     922                            pWindowInfo->style&=~WS_SYSMENU;
     923                        DrawRadWindow(i,pWindowInfo);
    907924                        return 1;
    908925                    }
     
    911928                    if(HIWORD(wParam)==BN_CLICKED){
    912929                        i=GetWndNum(GetParent(GetParent(hwnd)));
    913                         i2=GetWndInfoNum(MdiInfo[i].path);
     930                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    914931
    915932                        //変更情報
    916                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     933                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    917934
    918935                        if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_GETCHECK,0,0))
    919                             ProjectInfo.pWindowInfo[i2].style|=WS_MINIMIZEBOX;
     936                            pWindowInfo->style|=WS_MINIMIZEBOX;
    920937                        else
    921                             ProjectInfo.pWindowInfo[i2].style&=~WS_MINIMIZEBOX;
    922                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     938                            pWindowInfo->style&=~WS_MINIMIZEBOX;
     939                        DrawRadWindow(i,pWindowInfo);
    923940                        return 1;
    924941                    }
     
    927944                    if(HIWORD(wParam)==BN_CLICKED){
    928945                        i=GetWndNum(GetParent(GetParent(hwnd)));
    929                         i2=GetWndInfoNum(MdiInfo[i].path);
     946                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    930947
    931948                        //変更情報
    932                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     949                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    933950
    934951                        if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_GETCHECK,0,0))
    935                             ProjectInfo.pWindowInfo[i2].style|=WS_MAXIMIZEBOX;
     952                            pWindowInfo->style|=WS_MAXIMIZEBOX;
    936953                        else
    937                             ProjectInfo.pWindowInfo[i2].style&=~WS_MAXIMIZEBOX;
    938                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     954                            pWindowInfo->style&=~WS_MAXIMIZEBOX;
     955                        DrawRadWindow(i,pWindowInfo);
    939956                        return 1;
    940957                    }
     
    943960                    if(HIWORD(wParam)==BN_CLICKED){
    944961                        i=GetWndNum(GetParent(GetParent(hwnd)));
    945                         i2=GetWndInfoNum(MdiInfo[i].path);
     962                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    946963
    947964                        //変更情報
    948                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     965                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    949966
    950967                        if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_GETCHECK,0,0))
    951                             ProjectInfo.pWindowInfo[i2].style|=WS_MINIMIZE;
     968                            pWindowInfo->style|=WS_MINIMIZE;
    952969                        else
    953                             ProjectInfo.pWindowInfo[i2].style&=~WS_MINIMIZE;
    954                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     970                            pWindowInfo->style&=~WS_MINIMIZE;
     971                        DrawRadWindow(i,pWindowInfo);
    955972                        return 1;
    956973                    }
     
    959976                    if(HIWORD(wParam)==BN_CLICKED){
    960977                        i=GetWndNum(GetParent(GetParent(hwnd)));
    961                         i2=GetWndInfoNum(MdiInfo[i].path);
     978                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    962979
    963980                        //変更情報
    964                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     981                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    965982
    966983                        if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_GETCHECK,0,0))
    967                             ProjectInfo.pWindowInfo[i2].style|=WS_MAXIMIZE;
     984                            pWindowInfo->style|=WS_MAXIMIZE;
    968985                        else
    969                             ProjectInfo.pWindowInfo[i2].style&=~WS_MAXIMIZE;
    970                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     986                            pWindowInfo->style&=~WS_MAXIMIZE;
     987                        DrawRadWindow(i,pWindowInfo);
    971988                        return 1;
    972989                    }
     
    974991                    if(HIWORD(wParam)==BN_CLICKED){
    975992                        i=GetWndNum(GetParent(GetParent(hwnd)));
    976                         i2=GetWndInfoNum(MdiInfo[i].path);
     993                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    977994
    978995                        //変更情報
    979                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     996                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    980997
    981998                        if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_GETCHECK,0,0))
    982                             ProjectInfo.pWindowInfo[i2].style|=WS_HSCROLL;
     999                            pWindowInfo->style|=WS_HSCROLL;
    9831000                        else
    984                             ProjectInfo.pWindowInfo[i2].style&=~WS_HSCROLL;
    985                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     1001                            pWindowInfo->style&=~WS_HSCROLL;
     1002                        DrawRadWindow(i,pWindowInfo);
    9861003                        return 1;
    9871004                    }
     
    9891006                    if(HIWORD(wParam)==BN_CLICKED){
    9901007                        i=GetWndNum(GetParent(GetParent(hwnd)));
    991                         i2=GetWndInfoNum(MdiInfo[i].path);
     1008                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    9921009
    9931010                        //変更情報
    994                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     1011                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    9951012
    9961013                        if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_GETCHECK,0,0))
    997                             ProjectInfo.pWindowInfo[i2].style|=WS_VSCROLL;
     1014                            pWindowInfo->style|=WS_VSCROLL;
    9981015                        else
    999                             ProjectInfo.pWindowInfo[i2].style&=~WS_VSCROLL;
    1000                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     1016                            pWindowInfo->style&=~WS_VSCROLL;
     1017                        DrawRadWindow(i,pWindowInfo);
    10011018                        return 1;
    10021019                    }
     
    10051022                    if(HIWORD(wParam)==BN_CLICKED){
    10061023                        i=GetWndNum(GetParent(GetParent(hwnd)));
    1007                         i2=GetWndInfoNum(MdiInfo[i].path);
     1024                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    10081025
    10091026                        //変更情報
    1010                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     1027                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    10111028
    10121029                        if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0))
    1013                             ProjectInfo.pWindowInfo[i2].style|=WS_DISABLED;
     1030                            pWindowInfo->style|=WS_DISABLED;
    10141031                        else
    1015                             ProjectInfo.pWindowInfo[i2].style&=~WS_DISABLED;
    1016                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     1032                            pWindowInfo->style&=~WS_DISABLED;
     1033                        DrawRadWindow(i,pWindowInfo);
    10171034                        return 1;
    10181035                    }
     
    10211038                    if(HIWORD(wParam)==BN_CLICKED){
    10221039                        i=GetWndNum(GetParent(GetParent(hwnd)));
    1023                         i2=GetWndInfoNum(MdiInfo[i].path);
     1040                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    10241041
    10251042                        //変更情報
    1026                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     1043                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    10271044
    10281045                        if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_GETCHECK,0,0))
    1029                             ProjectInfo.pWindowInfo[i2].style|=WS_CLIPSIBLINGS;
     1046                            pWindowInfo->style|=WS_CLIPSIBLINGS;
    10301047                        else
    1031                             ProjectInfo.pWindowInfo[i2].style&=~WS_CLIPSIBLINGS;
    1032                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     1048                            pWindowInfo->style&=~WS_CLIPSIBLINGS;
     1049                        DrawRadWindow(i,pWindowInfo);
    10331050                        return 1;
    10341051                    }
     
    10371054                    if(HIWORD(wParam)==BN_CLICKED){
    10381055                        i=GetWndNum(GetParent(GetParent(hwnd)));
    1039                         i2=GetWndInfoNum(MdiInfo[i].path);
     1056                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    10401057
    10411058                        //変更情報
    1042                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     1059                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    10431060
    10441061                        if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_GETCHECK,0,0))
    1045                             ProjectInfo.pWindowInfo[i2].style|=WS_CLIPCHILDREN;
     1062                            pWindowInfo->style|=WS_CLIPCHILDREN;
    10461063                        else
    1047                             ProjectInfo.pWindowInfo[i2].style&=~WS_CLIPCHILDREN;
    1048                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     1064                            pWindowInfo->style&=~WS_CLIPCHILDREN;
     1065                        DrawRadWindow(i,pWindowInfo);
    10491066                        return 1;
    10501067                    }
     
    10531070                    if(HIWORD(wParam)==BN_CLICKED){
    10541071                        i=GetWndNum(GetParent(GetParent(hwnd)));
    1055                         i2=GetWndInfoNum(MdiInfo[i].path);
     1072                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    10561073
    10571074                        //変更情報
    1058                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
     1075                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
    10591076
    10601077                        if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0))
    1061                             ProjectInfo.pWindowInfo[i2].style|=WS_VISIBLE;
     1078                            pWindowInfo->style|=WS_VISIBLE;
    10621079                        else
    1063                             ProjectInfo.pWindowInfo[i2].style&=~WS_VISIBLE;
    1064                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     1080                            pWindowInfo->style&=~WS_VISIBLE;
     1081                        DrawRadWindow(i,pWindowInfo);
    10651082                        return 1;
    10661083                    }
     
    10701087                    if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Window_ExStyle)) return 1;
    10711088                    i=GetWndNum(GetParent(GetParent(hwnd)));
    1072                     i2=GetWndInfoNum(MdiInfo[i].path);
    1073                     DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     1089                    DrawRadWindow(i,GetWndInfo(MdiInfo[i].path));
    10741090                    return 1;
    10751091
     
    10791095                    if(HIWORD(wParam)==BN_CLICKED){
    10801096                        i=GetWndNum(GetParent(GetParent(hwnd)));
    1081                         i2=GetWndInfoNum(MdiInfo[i].path);
     1097                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
    10821098
    10831099                        //変更情報
    1084                         Rad_NoticeChanging(i,RAD_UNDO_TYPE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].type);
     1100                        Rad_NoticeChanging(i,RAD_UNDO_TYPE,SELECT_WINDOW,pWindowInfo->type);
    10851101
    10861102                        if(SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_GETCHECK,0,0))
    1087                             ProjectInfo.pWindowInfo[i2].type=WNDTYPE_DEFAULT;
     1103                            pWindowInfo->type=WNDTYPE_DEFAULT;
    10881104                        else if(SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_GETCHECK,0,0))
    1089                             ProjectInfo.pWindowInfo[i2].type=WNDTYPE_MODALDLG;
     1105                            pWindowInfo->type=WNDTYPE_MODALDLG;
    10901106                        else if(SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_GETCHECK,0,0))
    1091                             ProjectInfo.pWindowInfo[i2].type=WNDTYPE_MODELESSDLG;
     1107                            pWindowInfo->type=WNDTYPE_MODELESSDLG;
    10921108                        return 1;
    10931109                    }
     
    11031119    extern MDIINFO MdiInfo[MAX_WNDNUM];
    11041120    extern PROJECTINFO ProjectInfo;
    1105     int i,i2,i3;
     1121    int i,i3;
    11061122    char *temporary;
    11071123    POINTANDSIZE PointAndSize;
     
    11091125    switch(message){
    11101126        case WM_INITDIALOG:
    1111             SetPosCenter(hwnd);
    1112             i=GetWndNum(GetWindow(hClient,GW_CHILD));
    1113             i2=GetWndInfoNum(MdiInfo[i].path);
    1114             if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
    1115                 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].caption);
    1116             else
    1117                 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
    1118             break;
     1127            {
     1128                SetPosCenter(hwnd);
     1129                i=GetWndNum(GetWindow(hClient,GW_CHILD));
     1130                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     1131                if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
     1132                    SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
     1133                else
     1134                    SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
     1135                break;
     1136            }
    11191137        case WM_COMMAND:
    11201138            switch(LOWORD(wParam)){
    11211139                case IDOK:
    1122                     i=GetWndNum(GetWindow(hClient,GW_CHILD));
    1123                     i2=GetWndInfoNum(MdiInfo[i].path);
    1124 
    1125                     i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_CAPTION))+1;
    1126                     temporary=(char *)HeapAlloc(hHeap,0,i3);
    1127                     GetDlgItemText(hwnd,IDC_CAPTION,temporary,i3);
    1128                     if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
    1129                         if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].caption)==0){
    1130                             HeapDefaultFree(temporary);
    1131                             SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
    1132                             return 1;
    1133                         }
    1134 
    1135                         //変更情報を更新
    1136                         Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)ProjectInfo.pWindowInfo[i2].caption);
    1137 
    1138                         HeapDefaultFree(ProjectInfo.pWindowInfo[i2].caption);
    1139                         ProjectInfo.pWindowInfo[i2].caption=temporary;
     1140                    {
     1141                        i=GetWndNum(GetWindow(hClient,GW_CHILD));
     1142                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     1143
     1144                        i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_CAPTION))+1;
     1145                        temporary=(char *)HeapAlloc(hHeap,0,i3);
     1146                        GetDlgItemText(hwnd,IDC_CAPTION,temporary,i3);
     1147                        if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
     1148                            if(lstrcmp(temporary,pWindowInfo->caption)==0){
     1149                                HeapDefaultFree(temporary);
     1150                                SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
     1151                                return 1;
     1152                            }
     1153
     1154                            //変更情報を更新
     1155                            Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->caption);
     1156
     1157                            HeapDefaultFree(pWindowInfo->caption);
     1158                            pWindowInfo->caption=temporary;
     1159                        }
     1160                        else{
     1161                            if(lstrcmp(temporary,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption)==0){
     1162                                HeapDefaultFree(temporary);
     1163                                SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
     1164                                return 1;
     1165                            }
     1166
     1167                            //変更情報を更新
     1168                            Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
     1169
     1170                            HeapDefaultFree(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
     1171                            pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption=temporary;
     1172
     1173                            if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){
     1174                                //スタティック テキスト
     1175                                //テキストが表示できるようにサイズを拡大する
     1176
     1177                                PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
     1178                                PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
     1179                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
     1180
     1181                                HFONT hFont,hOldFont;
     1182                                hFont=CreateFontIndirect(&pWindowInfo->LogFont);
     1183                                hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
     1184                                GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
     1185                                SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
     1186                                DeleteObject(hFont);
     1187
     1188                                //テキストの終端に余裕を持たせる
     1189                                PointAndSize.size.cx+=5;
     1190
     1191                                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
     1192                                    pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
     1193                            }
     1194                            if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX){
     1195                                //チェック ボックス
     1196                                //テキストが表示できるようにサイズを拡大する
     1197
     1198                                PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
     1199                                PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
     1200                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
     1201
     1202                                HFONT hFont,hOldFont;
     1203                                hFont=CreateFontIndirect(&pWindowInfo->LogFont);
     1204                                hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
     1205                                GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
     1206                                SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
     1207                                DeleteObject(hFont);
     1208
     1209                                //テキストの終端に余裕を持たせる
     1210                                PointAndSize.size.cx+=21;
     1211
     1212                                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
     1213                                    pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
     1214                            }
     1215                            if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON){
     1216                                //ラジオ ボックス
     1217                                //テキストが表示できるようにサイズを拡大する
     1218
     1219                                PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
     1220                                PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
     1221                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
     1222
     1223                                HFONT hFont,hOldFont;
     1224                                hFont=CreateFontIndirect(&pWindowInfo->LogFont);
     1225                                hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
     1226                                GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
     1227                                SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
     1228                                DeleteObject(hFont);
     1229
     1230                                //テキストの終端に余裕を持たせる
     1231                                PointAndSize.size.cx+=20;
     1232
     1233                                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
     1234                                    pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
     1235                            }
     1236                        }
     1237                        DrawRadWindow(i,pWindowInfo);
     1238                        EndDialog(hwnd,1);
     1239                        return 1;
    11401240                    }
    1141                     else{
    1142                         if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption)==0){
    1143                             HeapDefaultFree(temporary);
    1144                             SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
    1145                             return 1;
    1146                         }
    1147 
    1148                         //変更情報を更新
    1149                         Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
    1150 
    1151                         HeapDefaultFree(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
    1152                         ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption=temporary;
    1153 
    1154                         if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){
    1155                             //スタティック テキスト
    1156                             //テキストが表示できるようにサイズを拡大する
    1157 
    1158                             PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
    1159                             PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
    1160                             Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
    1161 
    1162                             HFONT hFont,hOldFont;
    1163                             hFont=CreateFontIndirect(&ProjectInfo.pWindowInfo[i2].LogFont);
    1164                             hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
    1165                             GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
    1166                             SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
    1167                             DeleteObject(hFont);
    1168 
    1169                             //テキストの終端に余裕を持たせる
    1170                             PointAndSize.size.cx+=5;
    1171 
    1172                             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
    1173                                 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
    1174                         }
    1175                         if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX){
    1176                             //チェック ボックス
    1177                             //テキストが表示できるようにサイズを拡大する
    1178 
    1179                             PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
    1180                             PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
    1181                             Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
    1182 
    1183                             HFONT hFont,hOldFont;
    1184                             hFont=CreateFontIndirect(&ProjectInfo.pWindowInfo[i2].LogFont);
    1185                             hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
    1186                             GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
    1187                             SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
    1188                             DeleteObject(hFont);
    1189 
    1190                             //テキストの終端に余裕を持たせる
    1191                             PointAndSize.size.cx+=21;
    1192 
    1193                             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
    1194                                 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
    1195                         }
    1196                         if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON){
    1197                             //ラジオ ボックス
    1198                             //テキストが表示できるようにサイズを拡大する
    1199 
    1200                             PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
    1201                             PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
    1202                             Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
    1203 
    1204                             HFONT hFont,hOldFont;
    1205                             hFont=CreateFontIndirect(&ProjectInfo.pWindowInfo[i2].LogFont);
    1206                             hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
    1207                             GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
    1208                             SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
    1209                             DeleteObject(hFont);
    1210 
    1211                             //テキストの終端に余裕を持たせる
    1212                             PointAndSize.size.cx+=20;
    1213 
    1214                             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
    1215                                 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
    1216                         }
    1217                     }
    1218                     DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1219                     EndDialog(hwnd,1);
    1220                     return 1;
    12211241                case IDCANCEL:
    12221242                    EndDialog(hwnd,0);
     
    12321252    extern MDIINFO MdiInfo[MAX_WNDNUM];
    12331253    extern PROJECTINFO ProjectInfo;
    1234     int i,i2,i3;
     1254    int i,i3;
    12351255    char *temporary;
    12361256
    12371257    switch(message){
    12381258        case WM_INITDIALOG:
    1239             SetPosCenter(hwnd);
    1240             i=GetWndNum(GetWindow(hClient,GW_CHILD));
    1241             i2=GetWndInfoNum(MdiInfo[i].path);
    1242             SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
     1259            {
     1260                SetPosCenter(hwnd);
     1261                i=GetWndNum(GetWindow(hClient,GW_CHILD));
     1262                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     1263                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
     1264            }
    12431265            break;
    12441266        case WM_COMMAND:
    12451267            switch(LOWORD(wParam)){
    12461268                case IDOK:
    1247                     i=GetWndNum(GetWindow(hClient,GW_CHILD));
    1248                     i2=GetWndInfoNum(MdiInfo[i].path);
    1249 
    1250                     i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_IDNAME))+1;
    1251                     if(i3==1){
    1252                         //MsgBox "ID名を入力して下さい。"
    1253                         MessageBox(hOwner,STRING_ITEM_RENAME_MUST_ID,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
    1254                         break;
    1255                     }
    1256                     temporary=(char *)HeapAlloc(hHeap,0,i3);
    1257                     GetDlgItemText(hwnd,IDC_IDNAME,temporary,i3);
    1258                     if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName)==0){
    1259                         HeapDefaultFree(temporary);
    1260                         SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
     1269                    {
     1270                        i=GetWndNum(GetWindow(hClient,GW_CHILD));
     1271                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     1272
     1273                        i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_IDNAME))+1;
     1274                        if(i3==1){
     1275                            //MsgBox "ID名を入力して下さい。"
     1276                            MessageBox(hOwner,STRING_ITEM_RENAME_MUST_ID,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
     1277                            break;
     1278                        }
     1279                        temporary=(char *)HeapAlloc(hHeap,0,i3);
     1280                        GetDlgItemText(hwnd,IDC_IDNAME,temporary,i3);
     1281                        if(lstrcmp(temporary,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName)==0){
     1282                            HeapDefaultFree(temporary);
     1283                            SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
     1284                            return 1;
     1285                        }
     1286
     1287                        //MsgBox "アイテムのID名を変更すると、ソースコード内のID名は手動で変換する必要があります。変更しますか?"
     1288                        if(IDCANCEL==MessageBox(hwnd,STRING_ITEM_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
     1289
     1290                        //変更情報を更新
     1291                        Rad_NoticeChanging(i,RAD_UNDO_NAME,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
     1292
     1293                        HeapDefaultFree(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
     1294                        pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName=temporary;
     1295
     1296                        EndDialog(hwnd,1);
    12611297                        return 1;
    12621298                    }
    1263 
    1264                     //MsgBox "アイテムのID名を変更すると、ソースコード内のID名は手動で変換する必要があります。変更しますか?"
    1265                     if(IDCANCEL==MessageBox(hwnd,STRING_ITEM_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
    1266 
    1267                     //変更情報を更新
    1268                     Rad_NoticeChanging(i,RAD_UNDO_NAME,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
    1269 
    1270                     HeapDefaultFree(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
    1271                     ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName=temporary;
    1272 
    1273                     EndDialog(hwnd,1);
    1274                     return 1;
    12751299                case IDCANCEL:
    12761300                    EndDialog(hwnd,0);
     
    12861310    extern PROJECTINFO ProjectInfo;
    12871311
     1312    WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
     1313
    12881314    switch(LOWORD(wParam)){
    12891315        case IDC_RENAMEID:
    12901316            if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMEID),hwnd,(DLGPROC)DlgRadProperty_Item_RenameID)) return 1;
    1291             SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName);
     1317            SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName);
    12921318            return 1;
    12931319        case IDC_RENAMECAPTION:
    12941320            if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1;
    1295             SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].caption);
     1321            SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].caption);
    12961322            return 1;
    12971323        case IDC_STYLE_DISABLED:
    12981324            if(HIWORD(wParam)==BN_CLICKED){
    12991325                //変更情報
    1300                 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
     1326                Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
    13011327
    13021328                if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0))
    1303                     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_DISABLED;
     1329                    pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_DISABLED;
    13041330                else
    1305                     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_DISABLED;
    1306                 DrawRadWindow(WndNum,&ProjectInfo.pWindowInfo[WndInfoNum]);
     1331                    pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_DISABLED;
     1332                DrawRadWindow(WndNum,pWindowInfo);
    13071333                return 1;
    13081334            }
     
    13111337            if(HIWORD(wParam)==BN_CLICKED){
    13121338                //変更情報
    1313                 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
     1339                Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
    13141340
    13151341                if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0))
    1316                     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_VISIBLE;
     1342                    pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_VISIBLE;
    13171343                else
    1318                     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_VISIBLE;
     1344                    pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_VISIBLE;
    13191345                return 1;
    13201346            }
     
    13231349            if(HIWORD(wParam)==BN_CLICKED){
    13241350                //変更情報
    1325                 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
     1351                Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
    13261352
    13271353                if(SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_GETCHECK,0,0))
    1328                     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_GROUP;
     1354                    pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_GROUP;
    13291355                else
    1330                     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_GROUP;
     1356                    pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_GROUP;
    13311357                return 1;
    13321358            }
     
    13351361            if(HIWORD(wParam)==BN_CLICKED){
    13361362                //変更情報
    1337                 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
     1363                Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
    13381364
    13391365                if(SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_GETCHECK,0,0))
    1340                     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_TABSTOP;
     1366                    pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_TABSTOP;
    13411367                else
    1342                     ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_TABSTOP;
     1368                    pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_TABSTOP;
    13431369                return 1;
    13441370            }
     
    13501376    extern MDIINFO MdiInfo[MAX_WNDNUM];
    13511377    extern PROJECTINFO ProjectInfo;
    1352     int i,i2;
     1378    int i;
    13531379
    13541380    switch(message){
    13551381        case WM_INITDIALOG:
    1356             SetPosCenter(hwnd);
    1357             i=GetWndNum(GetWindow(hClient,GW_CHILD));
    1358             i2=GetWndInfoNum(MdiInfo[i].path);
    1359             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
    1360             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
    1361             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_DLGMODALFRAME) SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_SETCHECK,BST_CHECKED,0);
    1362             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
    1363             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
    1364             break;
     1382            {
     1383                SetPosCenter(hwnd);
     1384                i=GetWndNum(GetWindow(hClient,GW_CHILD));
     1385                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     1386                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
     1387                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
     1388                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_DLGMODALFRAME) SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_SETCHECK,BST_CHECKED,0);
     1389                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
     1390                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
     1391                break;
     1392            }
    13651393        case WM_COMMAND:
    13661394            switch(LOWORD(wParam)){
    13671395                case IDOK:
    1368                     i=GetWndNum(GetWindow(hClient,GW_CHILD));
    1369                     i2=GetWndInfoNum(MdiInfo[i].path);
    1370 
    1371                     DWORD style;
    1372                     style=0;
    1373                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
    1374                         style|=WS_EX_ACCEPTFILES;
    1375                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
    1376                         style|=WS_EX_TRANSPARENT;
    1377                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_GETCHECK,0,0))
    1378                         style|=WS_EX_DLGMODALFRAME;
    1379                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
    1380                         style|=WS_EX_CLIENTEDGE;
    1381                     if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
    1382                         style|=WS_EX_STATICEDGE;
    1383 
    1384                     if(style==ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle){
    1385                         SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
     1396                    {
     1397                        i=GetWndNum(GetWindow(hClient,GW_CHILD));
     1398                        WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     1399
     1400                        DWORD style;
     1401                        style=0;
     1402                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
     1403                            style|=WS_EX_ACCEPTFILES;
     1404                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
     1405                            style|=WS_EX_TRANSPARENT;
     1406                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_GETCHECK,0,0))
     1407                            style|=WS_EX_DLGMODALFRAME;
     1408                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
     1409                            style|=WS_EX_CLIENTEDGE;
     1410                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
     1411                            style|=WS_EX_STATICEDGE;
     1412
     1413                        if(style==pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle){
     1414                            SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
     1415                            return 1;
     1416                        }
     1417
     1418                        //変更情報
     1419                        Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle);
     1420
     1421                        pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle=style;
     1422                        EndDialog(hwnd,1);
    13861423                        return 1;
    13871424                    }
    1388 
    1389                     //変更情報
    1390                     Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle);
    1391 
    1392                     ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle=style;
    1393                     EndDialog(hwnd,1);
    1394                     return 1;
    13951425                case IDCANCEL:
    13961426                    EndDialog(hwnd,0);
     
    14141444    switch(message){
    14151445        case WM_INITDIALOG:
    1416             bInitial=1;
    1417             i=GetWndNum(GetParent(GetParent(hwnd)));
    1418             i2=GetWndInfoNum(MdiInfo[i].path);
    1419 
    1420             SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
    1421             SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
    1422 
    1423 
    1424             ////////////
    1425             //スタイル
    1426 
    1427             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
    1428             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
    1429             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
    1430             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
    1431 
    1432             if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_OWNERDRAW)==BS_OWNERDRAW) SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_CHECKED,0);
    1433             else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_DEFPUSHBUTTON) SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_CHECKED,0);
    1434 
    1435             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
    1436             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
    1437             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
    1438             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
    1439 
    1440 
    1441             //////////////////
    1442             // 水平方向の配置
    1443             //////////////////
    1444 
    1445             //"デフォルト"
    1446             SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
    1447             //"左端"
    1448             SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
    1449             //"右端"
    1450             SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
    1451             //"中央"
    1452             SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
    1453 
    1454             //ビットを考慮してBS_CENTERを最初に比較する
    1455             if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
    1456             else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
    1457             else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
    1458             else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
    1459 
    1460 
    1461             //////////////////
    1462             // 垂直方向の配置
    1463             //////////////////
    1464 
    1465             //"デフォルト"
    1466             SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
    1467             //"上端"
    1468             SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
    1469             //"下端"
    1470             SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
    1471             //"中央"
    1472             SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
    1473 
    1474             //ビットを考慮してBS_VCENTERを最初に比較する
    1475             if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
    1476             else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
    1477             else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
    1478             else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
    1479 
    1480 
    1481             bInitial=0;
    1482             break;
     1446            {
     1447                bInitial=1;
     1448                i=GetWndNum(GetParent(GetParent(hwnd)));
     1449                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     1450
     1451                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
     1452                SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
     1453
     1454
     1455                ////////////
     1456                //スタイル
     1457
     1458                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
     1459                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
     1460                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
     1461                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
     1462
     1463                if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_OWNERDRAW)==BS_OWNERDRAW) SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_CHECKED,0);
     1464                else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_DEFPUSHBUTTON) SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_CHECKED,0);
     1465
     1466                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
     1467                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
     1468                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
     1469                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
     1470
     1471
     1472                //////////////////
     1473                // 水平方向の配置
     1474                //////////////////
     1475
     1476                //"デフォルト"
     1477                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
     1478                //"左端"
     1479                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
     1480                //"右端"
     1481                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
     1482                //"中央"
     1483                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
     1484
     1485                //ビットを考慮してBS_CENTERを最初に比較する
     1486                if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
     1487                else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
     1488                else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
     1489                else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
     1490
     1491
     1492                //////////////////
     1493                // 垂直方向の配置
     1494                //////////////////
     1495
     1496                //"デフォルト"
     1497                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
     1498                //"上端"
     1499                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
     1500                //"下端"
     1501                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
     1502                //"中央"
     1503                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
     1504
     1505                //ビットを考慮してBS_VCENTERを最初に比較する
     1506                if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
     1507                else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
     1508                else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
     1509                else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
     1510
     1511
     1512                bInitial=0;
     1513                break;
     1514            }
    14831515        case WM_COMMAND:
    1484 
    1485             i=GetWndNum(GetParent(GetParent(hwnd)));
    1486             if(i==-1) return 1;
    1487             i2=GetWndInfoNum(MdiInfo[i].path);
    1488 
    1489             //共通スタイル
    1490             if(bInitial==0){
    1491                 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
    1492             }
    1493 
    1494             switch(LOWORD(wParam)){
    1495                 case IDC_BS_DEFPUSHBUTTON:
    1496                     if(HIWORD(wParam)==BN_CLICKED){
    1497                         //変更情報
    1498                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
    1499 
    1500                         if(SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_GETCHECK,0,0)){
    1501                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW;
    1502                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_DEFPUSHBUTTON;
    1503                             SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_UNCHECKED,0);
    1504                         }
    1505                         else
    1506                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON;
    1507                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
     1516            {
     1517                i=GetWndNum(GetParent(GetParent(hwnd)));
     1518                if(i==-1) return 1;
     1519                i2=GetWndInfoNum(MdiInfo[i].path);
     1520                WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[i2];
     1521
     1522                //共通スタイル
     1523                if(bInitial==0){
     1524                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
     1525                }
     1526
     1527                switch(LOWORD(wParam)){
     1528                    case IDC_BS_DEFPUSHBUTTON:
     1529                        if(HIWORD(wParam)==BN_CLICKED){
     1530                            //変更情報
     1531                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
     1532
     1533                            if(SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_GETCHECK,0,0)){
     1534                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW;
     1535                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_DEFPUSHBUTTON;
     1536                                SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_UNCHECKED,0);
     1537                            }
     1538                            else
     1539                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON;
     1540                            DrawRadWindow(i,pWindowInfo);
     1541                            return 1;
     1542                        }
     1543                        break;
     1544                    case IDC_BS_OWNERDRAW:
     1545                        if(HIWORD(wParam)==BN_CLICKED){
     1546                            //変更情報
     1547                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
     1548
     1549                            if(SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_GETCHECK,0,0)){
     1550                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON;
     1551                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_OWNERDRAW;
     1552                                SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_UNCHECKED,0);
     1553                            }
     1554                            else
     1555                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW;
     1556                            DrawRadWindow(i,pWindowInfo);
     1557                            return 1;
     1558                        }
     1559                        break;
     1560                    case IDC_BS_ICON:
     1561                        if(HIWORD(wParam)==BN_CLICKED){
     1562                            //変更情報
     1563                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
     1564
     1565                            if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
     1566                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON;
     1567                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
     1568                                SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
     1569                            }
     1570                            else
     1571                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
     1572                            DrawRadWindow(i,pWindowInfo);
     1573                            return 1;
     1574                        }
     1575                        break;
     1576                    case IDC_BS_BITMAP:
     1577                        if(HIWORD(wParam)==BN_CLICKED){
     1578                            //変更情報
     1579                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
     1580
     1581                            if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
     1582                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP;
     1583                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
     1584                                SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
     1585                            }
     1586                            else
     1587                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
     1588                            DrawRadWindow(i,pWindowInfo);
     1589                            return 1;
     1590                        }
     1591                        break;
     1592                    case IDC_BS_MULTILINE:
     1593                        if(HIWORD(wParam)==BN_CLICKED){
     1594                            //変更情報
     1595                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
     1596
     1597                            if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
     1598                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE;
     1599                            else
     1600                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE;
     1601                            DrawRadWindow(i,pWindowInfo);
     1602                            return 1;
     1603                        }
     1604                        break;
     1605                    case IDC_BS_NOTIFY:
     1606                        if(HIWORD(wParam)==BN_CLICKED){
     1607                            //変更情報
     1608                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
     1609
     1610                            if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
     1611                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY;
     1612                            else
     1613                                pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY;
     1614                            return 1;
     1615                        }
     1616                        break;
     1617
     1618                    case IDC_BS_HPOS:
     1619                        if(HIWORD(wParam)==CBN_SELCHANGE){
     1620                            //変更情報
     1621                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
     1622
     1623                            i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
     1624                            pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
     1625                            if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT;
     1626                            else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT;
     1627                            else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER;
     1628                            DrawRadWindow(i,pWindowInfo);
     1629                            return 1;
     1630                        }
     1631                        break;
     1632                    case IDC_BS_VPOS:
     1633                        if(HIWORD(wParam)==CBN_SELCHANGE){
     1634                            //変更情報
     1635                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
     1636
     1637                            i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
     1638                            pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
     1639                            if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP;
     1640                            else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM;
     1641                            else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER;
     1642                            DrawRadWindow(i,pWindowInfo);
     1643                            return 1;
     1644                        }
     1645                        break;
     1646
     1647                    case IDC_EXSTYLE:
     1648                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
     1649                        DrawRadWindow(i,pWindowInfo);
    15081650                        return 1;
    1509                     }
    1510                     break;
    1511                 case IDC_BS_OWNERDRAW:
    1512                     if(HIWORD(wParam)==BN_CLICKED){
    1513                         //変更情報
    1514                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
    1515 
    1516                         if(SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_GETCHECK,0,0)){
    1517                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON;
    1518                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_OWNERDRAW;
    1519                             SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_UNCHECKED,0);
    1520                         }
    1521                         else
    1522                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW;
    1523                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1524                         return 1;
    1525                     }
    1526                     break;
    1527                 case IDC_BS_ICON:
    1528                     if(HIWORD(wParam)==BN_CLICKED){
    1529                         //変更情報
    1530                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
    1531 
    1532                         if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
    1533                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON;
    1534                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
    1535                             SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
    1536                         }
    1537                         else
    1538                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
    1539                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1540                         return 1;
    1541                     }
    1542                     break;
    1543                 case IDC_BS_BITMAP:
    1544                     if(HIWORD(wParam)==BN_CLICKED){
    1545                         //変更情報
    1546                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
    1547 
    1548                         if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
    1549                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP;
    1550                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
    1551                             SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
    1552                         }
    1553                         else
    1554                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
    1555                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1556                         return 1;
    1557                     }
    1558                     break;
    1559                 case IDC_BS_MULTILINE:
    1560                     if(HIWORD(wParam)==BN_CLICKED){
    1561                         //変更情報
    1562                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
    1563 
    1564                         if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
    1565                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE;
    1566                         else
    1567                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE;
    1568                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1569                         return 1;
    1570                     }
    1571                     break;
    1572                 case IDC_BS_NOTIFY:
    1573                     if(HIWORD(wParam)==BN_CLICKED){
    1574                         //変更情報
    1575                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
    1576 
    1577                         if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
    1578                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY;
    1579                         else
    1580                             ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY;
    1581                         return 1;
    1582                     }
    1583                     break;
    1584 
    1585                 case IDC_BS_HPOS:
    1586                     if(HIWORD(wParam)==CBN_SELCHANGE){
    1587                         //変更情報
    1588                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
    1589 
    1590                         i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
    1591                         ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
    1592                         if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT;
    1593                         else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT;
    1594                         else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER;
    1595                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1596                         return 1;
    1597                     }
    1598                     break;
    1599                 case IDC_BS_VPOS:
    1600                     if(HIWORD(wParam)==CBN_SELCHANGE){
    1601                         //変更情報
    1602                         Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
    1603 
    1604                         i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
    1605                         ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
    1606                         if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP;
    1607                         else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM;
    1608                         else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER;
    1609                         DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1610                         return 1;
    1611                     }
    1612                     break;
    1613 
    1614                 case IDC_EXSTYLE:
    1615                     if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
    1616                     DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
    1617                     return 1;
    1618             }
    1619             break;
     1651                }
     1652                break;
     1653            }
    16201654    }
    16211655    return 0;
     
    16331667    switch(message){
    16341668        case WM_INITDIALOG:
    1635             bInitial=1;
    1636             i=GetWndNum(GetParent(GetParent(hwnd)));
    1637             i2=GetWndInfoNum(MdiInfo[i].path);
    1638 
    1639             SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
    1640             SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
    1641 
    1642 
    1643             ////////////
    1644             //スタイル
    1645 
    1646             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
    1647             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
    1648             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
    1649             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
    1650 
    1651             if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTOCHECKBOX)==BS_AUTOCHECKBOX) SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
    1652             if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTO3STATE)==BS_AUTO3STATE){
    1653                 SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
    1654                 SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0);
    1655             }
    1656             if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_3STATE)==BS_3STATE) SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0);
    1657             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0);
    1658             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0);
    1659             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
    1660             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
    1661             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
    1662             if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
    1663 
    1664 
    1665             //////////////////
    1666             // 水平方向の配置
    1667             //////////////////
    1668 
    1669             //"デフォルト"
    1670             SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
    1671             //"左端"
    1672             SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
    1673             //"右端"
    1674             SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
    1675             //"中央"
    1676             SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
    1677 
    1678             //ビットを考慮してBS_CENTERを最初に比較する
    1679             if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
    1680             else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
    1681             else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
    1682             else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
    1683 
    1684 
    1685             //////////////////
    1686             // 垂直方向の配置
    1687             //////////////////
    1688 
    1689             //"デフォルト"
    1690             SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
    1691             //"上端"
    1692             SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
    1693             //"下端"
    1694             SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
    1695             //"中央"
    1696             SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
    1697 
    1698             //ビットを考慮してBS_VCENTERを最初に比較する
    1699             if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
    1700             else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
    1701             else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
    1702             else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
    1703 
    1704 
    1705             bInitial=0;
    1706             break;
     1669            {
     1670                bInitial=1;
     1671                i=GetWndNum(GetParent(GetParent(hwnd)));
     1672                WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
     1673
     1674                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
     1675                SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
     1676
     1677
     1678                ////////////
     1679                //スタイル
     1680
     1681                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
     1682                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
     1683                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
     1684                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
     1685
     1686                if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTOCHECKBOX)==BS_AUTOCHECKBOX) SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
     1687                if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTO3STATE)==BS_AUTO3STATE){
     1688                    SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
     1689                    SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0);
     1690                }
     1691                if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_3STATE)==BS_3STATE) SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0);
     1692                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0);
     1693                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0);
     1694                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
     1695                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
     1696                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
     1697                if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
     1698
     1699
     1700                //////////////////
     1701                // 水平方向の配置
     1702                //////////////////
     1703
     1704                //"デフォルト"
     1705                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
     1706                //"左端"
     1707                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
     1708                //"右端"
     1709                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
     1710                //"中央"
     1711                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
     1712
     1713                //ビットを考慮してBS_CENTERを最初に比較する
     1714                if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
     1715                else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
     1716                else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
     1717                else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
     1718
     1719
     1720                //////////////////
     1721                // 垂直方向の配置
     1722                //////////////////
     1723
     1724                //"デフォルト"
     1725                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
     1726                //"上端"
     1727                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
     1728                //"下端"
     1729                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
     1730                //"中央"
     1731                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
     1732
     1733                //ビットを考慮してBS_VCENTERを最初に比較する
     1734