source: dev/trunk/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp @ 618

Last change on this file since 618 was 618, checked in by dai_9181, 15 years ago

・PROJECTINFO構造体を廃止し、Projectクラスを採用した。
・ProjectInfoをprojectInfoにリネーム

File size: 213.7 KB
Line 
1#include "stdafx.h"
2
3#include "Common.h"
4
5#if defined(JPN)
6//日本語
7#include "rad_msg_jpn.h"
8#else
9//英語
10#include "rad_msg_eng.h"
11#endif
12
13void ShowControlAdvice(int Control){
14    if(Control==IDC_TOOL_MOUSE) SetStatusText("");
15
16#if defined(JPN)
17    //日本語
18    else if(Control==IDC_TOOL_BUTTON) SetStatusText("[ボタン] クリックすることができるボタンです。");
19    else if(Control==IDC_TOOL_CHECKBOX) SetStatusText("[チェック ボックス] ON/OFFの設定ができるボタンです。");
20    else if(Control==IDC_TOOL_COMBOBOX) SetStatusText("[コンボ ボックス] ドロップダウン リストの中から項目を選択することができます。");
21    else if(Control==IDC_TOOL_EDIT) SetStatusText("[エディット ボックス] ユーザーが文字列の編集操作を行うことができます。");
22    else if(Control==IDC_TOOL_GROUPBOX) SetStatusText("[グループ ボックス] 複数のコントロールを囲むことができます。");
23    else if(Control==IDC_TOOL_HSCROLLBAR) SetStatusText("[水平スクロールバー] 現在位置を表示、設定します。");
24    else if(Control==IDC_TOOL_IMAGEBOX) SetStatusText("[イメージ ボックス] 四角形やビットマップ、アイコンを表示します。");
25    else if(Control==IDC_TOOL_LISTBOX) SetStatusText("[リスト ボックス] 複数の項目を表示、選択できるリストです。");
26    else if(Control==IDC_TOOL_LISTVIEW) SetStatusText("[リスト ビュー] リスト ボックス内にアイコンやテキストを並べて表示するビューです。");
27    else if(Control==IDC_TOOL_PROGRESSBAR) SetStatusText("[プログレス バー] 進行状況を表示するバー。");
28    else if(Control==IDC_TOOL_RADIOBUTTON) SetStatusText("[ラジオ ボタン] 複数の項目から1つを選択するボタンです。");
29    else if(Control==IDC_TOOL_STATIC) SetStatusText("[スタティック テキスト] テキストを表示します。");
30    else if(Control==IDC_TOOL_TRACKBAR) SetStatusText("[トラック バー] 目盛が付いた移動バー。");
31    else if(Control==IDC_TOOL_TREEVIEW) SetStatusText("[ツリー ビュー] リストを階層構造で表示します。");
32    else if(Control==IDC_TOOL_UPDOWN) SetStatusText("[アップ ダウン コントロール] 上下のボタンで数値を設定します。");
33    else if(Control==IDC_TOOL_VSCROLLBAR) SetStatusText("[垂直スクロールバー] 現在位置を表示、設定します。");
34#else
35    //英語
36    else if(Control==IDC_TOOL_BUTTON) SetStatusText("[Button] The button which can be clicked");
37    else if(Control==IDC_TOOL_CHECKBOX) SetStatusText("[CheckBox] The button which can switch on/off");
38    else if(Control==IDC_TOOL_COMBOBOX) SetStatusText("[ComboBox] Choose an item from drop down lists");
39    else if(Control==IDC_TOOL_EDIT) SetStatusText("[EditBox] A user can edit a character sequence");
40    else if(Control==IDC_TOOL_GROUPBOX) SetStatusText("[GroupBox] Two or more control can be packed");
41    else if(Control==IDC_TOOL_HSCROLLBAR) SetStatusText("[Horizontal Scrollbar] The present position is displayed and setup");
42    else if(Control==IDC_TOOL_IMAGEBOX) SetStatusText("[ImageBox] A rectangle, a bitmap, and an icon are displayed.");
43    else if(Control==IDC_TOOL_LISTBOX) SetStatusText("[ListBox] The list which can display and choose two or more items");
44    else if(Control==IDC_TOOL_LISTVIEW) SetStatusText("[ListView] The view which displays an icon and a text in a list box");
45    else if(Control==IDC_TOOL_PROGRESSBAR) SetStatusText("[Progressbar] The bar which displays an advance situation");
46    else if(Control==IDC_TOOL_RADIOBUTTON) SetStatusText("[RadioButton] The button which chooses one from two or more items");
47    else if(Control==IDC_TOOL_STATIC) SetStatusText("[StaticText] Display the text messages");
48    else if(Control==IDC_TOOL_TRACKBAR) SetStatusText("[Trackbar] The bar to which the scale was attached");
49    else if(Control==IDC_TOOL_TREEVIEW) SetStatusText("[TreeView] Lists are displayed by the layered structure");
50    else if(Control==IDC_TOOL_UPDOWN) SetStatusText("[Up/Down Control] A numerical value is set up with a up/down button");
51    else if(Control==IDC_TOOL_VSCROLLBAR) SetStatusText("[Vertical Scrollbar] The present position is displayed and setup");
52#endif
53}
54
55char *GetControlName(DWORD id){
56    char *pTemp;
57    pTemp="";
58
59#if defined(JPN)
60    //日本語
61    if(id==IDC_TOOL_MOUSE) pTemp="選択";
62    else if(id==IDC_TOOL_STATIC) pTemp="スタティック テキスト";
63    else if(id==IDC_TOOL_EDIT) pTemp="エディット ボックス";
64    else if(id==IDC_TOOL_GROUPBOX) pTemp="グループ ボックス";
65    else if(id==IDC_TOOL_COMBOBOX) pTemp="コンボ ボックス";
66    else if(id==IDC_TOOL_LISTBOX) pTemp="リスト ボックス";
67    else if(id==IDC_TOOL_BUTTON) pTemp="ボタン";
68    else if(id==IDC_TOOL_CHECKBOX) pTemp="チェック ボックス";
69    else if(id==IDC_TOOL_RADIOBUTTON) pTemp="ラジオ ボタン";
70    else if(id==IDC_TOOL_LISTVIEW) pTemp="リスト ビュー";
71    else if(id==IDC_TOOL_TREEVIEW) pTemp="ツリー ビュー";
72    else if(id==IDC_TOOL_HSCROLLBAR) pTemp="水平スクロール バー";
73    else if(id==IDC_TOOL_VSCROLLBAR) pTemp="垂直スクロール バー";
74    else if(id==IDC_TOOL_UPDOWN) pTemp="アップ ダウン コントロール";
75    else if(id==IDC_TOOL_IMAGEBOX) pTemp="イメージ ボックス";
76    else if(id==IDC_TOOL_TRACKBAR) pTemp="トラック バー";
77    else if(id==IDC_TOOL_PROGRESSBAR) pTemp="プログレス バー";
78#else
79    //英語
80    if(id==IDC_TOOL_MOUSE) pTemp="Tool";
81    else if(id==IDC_TOOL_STATIC) pTemp="StaticText";
82    else if(id==IDC_TOOL_EDIT) pTemp="EditBox";
83    else if(id==IDC_TOOL_GROUPBOX) pTemp="GroupBox";
84    else if(id==IDC_TOOL_COMBOBOX) pTemp="ComboBox";
85    else if(id==IDC_TOOL_LISTBOX) pTemp="ListBox";
86    else if(id==IDC_TOOL_BUTTON) pTemp="Button";
87    else if(id==IDC_TOOL_CHECKBOX) pTemp="CheckBox";
88    else if(id==IDC_TOOL_RADIOBUTTON) pTemp="RadioButton";
89    else if(id==IDC_TOOL_LISTVIEW) pTemp="ListView";
90    else if(id==IDC_TOOL_TREEVIEW) pTemp="TreeView";
91    else if(id==IDC_TOOL_HSCROLLBAR) pTemp="Horizontal Scrollbar";
92    else if(id==IDC_TOOL_VSCROLLBAR) pTemp="Vertical Scrollbar";
93    else if(id==IDC_TOOL_UPDOWN) pTemp="Up/Down Control";
94    else if(id==IDC_TOOL_IMAGEBOX) pTemp="ImageBox";
95    else if(id==IDC_TOOL_TRACKBAR) pTemp="Trackbar";
96    else if(id==IDC_TOOL_PROGRESSBAR) pTemp="Progressbar";
97#endif
98
99    return pTemp;
100}
101BOOL CALLBACK RadToolButtonsProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
102    extern MDIINFO MdiInfo[MAX_WNDNUM];
103    int i,i2,WndNum;
104    HWND hParent;
105    HWND hToolBar;
106    RECT rect;
107    TBBUTTON CtrlToolBar[]={
108        {0,IDC_TOOL_MOUSE,TBSTATE_ENABLED|TBSTATE_WRAP|TBSTATE_CHECKED,TBSTYLE_CHECKGROUP,0,0},
109        {1,IDC_TOOL_STATIC,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
110        {2,IDC_TOOL_EDIT,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
111        {3,IDC_TOOL_GROUPBOX,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
112        {BMPNUM_RADTOOLBAR-1,0,TBSTATE_INDETERMINATE,TBSTYLE_CHECKGROUP,0,0},
113        {4,IDC_TOOL_COMBOBOX,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
114        {5,IDC_TOOL_LISTBOX,TBSTATE_ENABLED|TBSTATE_WRAP,TBSTYLE_CHECKGROUP,0,0},
115        {6,IDC_TOOL_BUTTON,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
116        {7,IDC_TOOL_CHECKBOX,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
117        {8,IDC_TOOL_RADIOBUTTON,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
118        {BMPNUM_RADTOOLBAR-1,0,TBSTATE_INDETERMINATE,TBSTYLE_CHECKGROUP,0,0},
119        {9,IDC_TOOL_LISTVIEW,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
120        {10,IDC_TOOL_TREEVIEW,TBSTATE_ENABLED|TBSTATE_WRAP,TBSTYLE_CHECKGROUP,0,0},
121        {11,IDC_TOOL_HSCROLLBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
122        {12,IDC_TOOL_VSCROLLBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
123        {13,IDC_TOOL_UPDOWN,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
124        {BMPNUM_RADTOOLBAR-1,0,TBSTATE_INDETERMINATE,TBSTYLE_CHECKGROUP,0,0},
125        {14,IDC_TOOL_IMAGEBOX,TBSTATE_ENABLED|TBSTATE_WRAP,TBSTYLE_CHECKGROUP,0,0},
126        {15,IDC_TOOL_TRACKBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
127        {16,IDC_TOOL_PROGRESSBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
128    };
129    TOOLTIPTEXT *pTipText;
130
131    switch(message){
132        case WM_INITDIALOG:
133            hToolBar=CreateToolbarEx(hwnd,WS_CHILD|WS_VISIBLE|CCS_NODIVIDER|TBSTYLE_FLAT|TBSTYLE_TOOLTIPS,
134                NULL,
135                BMPNUM_RADTOOLBAR,  /*ビットマップの個数*/
136                hResInst,(unsigned int)MAKEINTRESOURCE(IDR_CONTROL),CtrlToolBar,
137                (BMPNUM_RADTOOLBAR-1)+SEPNUM_RADTOOLBAR,    /*アイテムの個数*/
138                0,0,16,15,sizeof(TBBUTTON));
139
140            //Windows9x系OSでの不具合を防ぐため
141            PostMessage(hwnd,WM_USER+120,0,0);
142
143            break;
144        case WM_USER+120:
145            GetClientRect(hwnd,&rect);
146            MoveWindow(hwnd,5,22,rect.right,rect.bottom,1);
147            MoveWindow(GetWindow(hwnd,GW_CHILD),0,0,rect.right,rect.bottom,1);
148            return 1;
149        case WM_COMMAND:
150            switch(LOWORD(wParam)){
151                case IDC_TOOL_MOUSE:
152                    ShowControlAdvice(LOWORD(wParam));
153                    hParent=GetParent(GetParent(hwnd));
154                    BringWindowToTop(hParent);
155                    i=GetWndNum(hParent);
156                    i2=GetWndInfoNum(MdiInfo[i].path);
157                    MdiInfo[i].MdiRadInfo->ButtonSelect=IDC_TOOL_MOUSE;
158                    DrawSelectingRect(MdiInfo[i].MdiRadInfo->hRad,i,i2,IDC_TOOL_MOUSE);
159                    SetFocus(MdiInfo[i].MdiRadInfo->hRad);
160                    return 1;
161                case IDC_TOOL_BUTTON:
162                case IDC_TOOL_CHECKBOX:
163                case IDC_TOOL_COMBOBOX:
164                case IDC_TOOL_EDIT:
165                case IDC_TOOL_GROUPBOX:
166                case IDC_TOOL_HSCROLLBAR:
167                case IDC_TOOL_IMAGEBOX:
168                case IDC_TOOL_LISTBOX:
169                case IDC_TOOL_LISTVIEW:
170                case IDC_TOOL_PROGRESSBAR:
171                case IDC_TOOL_RADIOBUTTON:
172                case IDC_TOOL_STATIC:
173                case IDC_TOOL_TRACKBAR:
174                case IDC_TOOL_TREEVIEW:
175                case IDC_TOOL_UPDOWN:
176                case IDC_TOOL_VSCROLLBAR:
177                    ShowControlAdvice(LOWORD(wParam));
178                    hParent=GetParent(GetParent(hwnd));
179                    BringWindowToTop(hParent);
180                    WndNum=GetWndNum(hParent);
181                    MdiInfo[WndNum].MdiRadInfo->ButtonSelect=LOWORD(wParam);
182                    InvalidateRect(MdiInfo[WndNum].MdiRadInfo->hRad,NULL,0);
183                    return 1;
184            }
185            break;
186        case WM_NOTIFY:
187            pTipText=(TOOLTIPTEXT *)lParam;
188            if(pTipText->hdr.code==TTN_NEEDTEXT){
189                //ステータスバーに説明文を表示
190                ShowControlAdvice(pTipText->hdr.idFrom);
191
192                //コントロール名を取得し、ツールヒントとして表示する
193                pTipText->lpszText=GetControlName(pTipText->hdr.idFrom);
194            }
195            break;
196    }
197    return 0;
198}
199LRESULT CALLBACK RadToolsWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
200    extern MDIINFO MdiInfo[MAX_WNDNUM];
201    extern HFONT hStatusFont;
202    int i;
203    RECT rect;
204    SCROLLINFO ScrollInfo;
205    HDC hdc;
206    PAINTSTRUCT ps;
207    HFONT hOldFont;
208    POINT pos;
209
210    switch(message){
211        case WM_CREATE:
212            CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_CTRLBUTTONS),hwnd,(DLGPROC)RadToolButtonsProc);
213            return 0;
214        case WM_VSCROLL:
215            ScrollInfo.cbSize=sizeof(SCROLLINFO);
216            ScrollInfo.fMask=SIF_POS|SIF_PAGE|SIF_RANGE;
217            GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
218            if(LOWORD(wParam)==SB_LINEUP) i=-20;
219            else if(LOWORD(wParam)==SB_LINEDOWN) i=20;
220            else if(LOWORD(wParam)==SB_PAGEUP) i=-(signed int)ScrollInfo.nPage;
221            else if(LOWORD(wParam)==SB_PAGEDOWN) i=ScrollInfo.nPage;
222            else if(LOWORD(wParam)==SB_THUMBTRACK) i=HIWORD(wParam)-ScrollInfo.nPos;
223            else i=0;
224            GetClientRect(hwnd,&rect);
225            i=max(-ScrollInfo.nPos,min(i,ScrollInfo.nMax-rect.bottom-ScrollInfo.nPos));
226            if(i!=0){
227                ScrollInfo.nPos+=i;
228                SetScrollInfo(hwnd,SB_VERT,&ScrollInfo,1);
229                ScrollWindow(hwnd,0,-i,NULL,NULL);
230                UpdateWindow(hwnd);
231            }
232            return 0;
233        case WM_SIZE:
234            GetClientRect(GetWindow(hwnd,GW_CHILD),&rect);
235            ScrollInfo.cbSize=sizeof(SCROLLINFO);
236            ScrollInfo.fMask=SIF_PAGE|SIF_RANGE|SIF_POS;
237
238            //垂直スクロールバーの設定
239            GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
240            ScrollInfo.nMin=0;
241            ScrollInfo.nMax=rect.bottom;
242            ScrollInfo.nPage=HIWORD(lParam);
243            SetScrollInfo(hwnd,SB_VERT,&ScrollInfo,1);
244
245            i=ScrollInfo.nPos;
246            ScrollInfo.fMask=SIF_POS;
247            GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
248            if(i>ScrollInfo.nPos){
249                ScrollWindow(hwnd,0,i-ScrollInfo.nPos,NULL,NULL);
250                UpdateWindow(hwnd);
251            }
252            return 0;
253        case WM_PAINT:
254            hdc=BeginPaint(hwnd,&ps);
255            hOldFont=(HFONT)SelectObject(hdc,hStatusFont);
256            SetBkMode(hdc,TRANSPARENT);
257            pos.x=30;
258            pos.y=3;
259            CursorPos_GlobalToLocal(hwnd,&pos.x,&pos.y);
260#if defined(JPN)
261            //日本語
262            TextOut(hdc,pos.x,pos.y,"- コントロール -",lstrlen("- コントロール -"));
263#else
264            //英語
265            TextOut(hdc,pos.x,pos.y,"-   Control   -",lstrlen("-   Control   -"));
266#endif
267            SelectObject(hdc,hOldFont);
268            EndPaint(hwnd,&ps);
269            return 0;
270    }
271    return DefWindowProc(hwnd,message,wParam,lParam);
272}
273
274
275/////////////////////////
276//ウィンドウ プロパティ
277
278void RadProperty_Window_Caption_StylingOrder(HWND hwnd,DWORD *style){
279    if((*style&WS_CAPTION)==WS_CAPTION){
280        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_SYSMENU),1);
281        if(!(*style&WS_CHILD)){
282            EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),1);
283            EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),1);
284        }
285        if(SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_GETCURSEL,0,0)==0){
286            if(*style&WS_THICKFRAME) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,2,0);
287            else SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,1,0);
288        }
289    }
290    else{
291        *style&=~(WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
292        SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_SETCHECK,BST_UNCHECKED,0);
293        SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
294        SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
295        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_SYSMENU),0);
296        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),0);
297        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),0);
298    }
299}
300void RadProperty_Window_Border_StylingOrder(HWND hwnd,DWORD *style){
301    if(*style&(WS_BORDER|WS_THICKFRAME)){
302        if(*style&(WS_POPUP|WS_CHILD)) EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),1);
303        else{
304            *style|=WS_CAPTION;
305            SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
306            EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),0);
307        }
308    }
309    else{
310        *style&=~WS_CAPTION;
311        SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_UNCHECKED,0);
312        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),0);
313    }
314    RadProperty_Window_Caption_StylingOrder(hwnd,style);
315}
316void RadProperty_Window_Window_StylingOrder(HWND hwnd,DWORD *style){
317    if(*style&WS_POPUP){
318        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),1);
319        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),1);
320        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),1);
321        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZE),1);
322        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZE),1);
323    }
324    else if(*style&WS_CHILD){
325        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),1);
326
327        *style&=~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_MINIMIZE|WS_MAXIMIZE);
328        SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
329        SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
330        SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_SETCHECK,BST_UNCHECKED,0);
331        SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_SETCHECK,BST_UNCHECKED,0);
332        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),0);
333        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),0);
334        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZE),0);
335        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZE),0);
336    }
337    else{
338        if(*style&WS_BORDER){
339            *style|=WS_CAPTION;
340            SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
341            EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),0);
342
343            EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),1);
344            EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),1);
345            EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZE),1);
346            EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZE),1);
347        }
348    }
349    RadProperty_Window_Border_StylingOrder(hwnd,style);
350}
351BOOL CALLBACK DlgRadProperty_Window_Rename(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
352    extern HANDLE hHeap;
353    extern HWND hClient,hOwner;
354    extern MDIINFO MdiInfo[MAX_WNDNUM];
355    int i,i3;
356    char temporary[MAX_PATH],temp2[MAX_PATH];
357    switch(message){
358        case WM_INITDIALOG:
359            {
360                SetPosCenter(hwnd);
361                i=GetWndNum(GetWindow(hClient,GW_CHILD));
362                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
363                sprintf(temporary,"h%s",pWindowInfo->GetName().c_str());
364                sprintf(temp2,"%sProc",pWindowInfo->GetName().c_str());
365                if( pWindowInfo->GetHandleName() == temporary &&
366                    lstrcmp(temp2,pWindowInfo->CallBackName)==0){
367                    SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_SETCHECK,BST_CHECKED,0);
368                    SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);
369                }
370                SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->GetName().c_str());
371                SetDlgItemText(hwnd,IDC_WINDOWHANDLE,pWindowInfo->GetHandleName().c_str());
372                SetDlgItemText(hwnd,IDC_WINDOWPROC,pWindowInfo->CallBackName);
373                break;
374            }
375        case WM_COMMAND:
376            switch(LOWORD(wParam)){
377                case IDOK:
378                    {
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                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
397
398                        RAD_UNDOSTATE_NAME names,NoticeNames;
399
400                        i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))+1;
401                        GetDlgItemText(hwnd,IDC_WINDOWNAME,temporary,i3);
402                        names.name = temporary;
403
404                        i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))+1;
405                        GetDlgItemText(hwnd,IDC_WINDOWHANDLE,temporary,i3);
406                        names.HandleName = temporary;
407
408                        i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))+1;
409                        names.CallBackName=(char *)HeapAlloc(hHeap,0,i3);
410                        GetDlgItemText(hwnd,IDC_WINDOWPROC,names.CallBackName,i3);
411
412                        if( names.name == pWindowInfo->GetName() &&
413                            pWindowInfo->GetHandleName() == names.HandleName &&
414                            lstrcmp(names.CallBackName,pWindowInfo->CallBackName)==0){
415                            HeapDefaultFree(names.CallBackName);
416                            SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
417                            return 1;
418                        }
419
420                        //MsgBox "これらのウィンドウ識別名を変更すると、ソースコード内の識別子は手動で変換する必要があります。変更しますか?"
421                        if(IDCANCEL==MessageBox(hwnd,STRING_WINDOW_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
422
423                        //変更情報を更新
424                        NoticeNames.name=pWindowInfo->GetName();
425                        NoticeNames.HandleName=pWindowInfo->GetHandleName();
426                        NoticeNames.CallBackName=pWindowInfo->CallBackName;
427                        Rad_NoticeChanging(i,RAD_UNDO_NAME,SELECT_WINDOW,(DWORD)&NoticeNames);
428
429                        pWindowInfo->SetName( names.name );
430                        GlobalFree(MdiInfo[i].path);
431                        MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,names.name.size()+1);
432                        lstrcpy(MdiInfo[i].path,names.name.c_str());
433
434                        pWindowInfo->SetHandleName( names.HandleName );
435
436                        HeapDefaultFree(pWindowInfo->CallBackName);
437                        pWindowInfo->CallBackName=names.CallBackName;
438
439                        EndDialog(hwnd,1);
440                        return 1;
441                    }
442                case IDCANCEL:
443                    EndDialog(hwnd,0);
444                    return 1;
445                case IDC_WINDOWNAME:
446                    if(HIWORD(wParam)==EN_CHANGE) SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);
447                    return 1;
448                case IDC_AUTOSET:
449                    if(SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_GETCHECK,0,0)){
450                        SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,1,0);
451                        SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,1,0);
452                        GetDlgItemText(hwnd,IDC_WINDOWNAME,temporary,MAX_PATH);
453                        if(temporary[0]){
454                            sprintf(temp2,"h%s",temporary);
455                            SetDlgItemText(hwnd,IDC_WINDOWHANDLE,temp2);
456                            sprintf(temp2,"%sProc",temporary);
457                            SetDlgItemText(hwnd,IDC_WINDOWPROC,temp2);
458                        }
459                        else{
460                            SetDlgItemText(hwnd,IDC_WINDOWHANDLE,"");
461                            SetDlgItemText(hwnd,IDC_WINDOWPROC,"");
462                        }
463                    }
464                    else{
465                        SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,0,0);
466                        SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,0,0);
467                    }
468                    return 1;
469            }
470            break;
471    }
472    return 0;
473}
474BOOL CALLBACK DlgRadProperty_Window_ExStyle(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
475    extern MDIINFO MdiInfo[MAX_WNDNUM];
476    int i;
477
478    switch(message){
479        case WM_INITDIALOG:
480            {
481                SetPosCenter(hwnd);
482                i=GetWndNum(GetWindow(hClient,GW_CHILD));
483                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
484                if(pWindowInfo->ExStyle&WS_EX_TOPMOST) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_SETCHECK,BST_CHECKED,0);
485                if(pWindowInfo->ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
486                if(pWindowInfo->ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
487                if(pWindowInfo->ExStyle&WS_EX_TOOLWINDOW) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_SETCHECK,BST_CHECKED,0);
488                if(pWindowInfo->ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
489                if(pWindowInfo->ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
490                if(pWindowInfo->ExStyle&WS_EX_NOPARENTNOTIFY) SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_SETCHECK,BST_CHECKED,0);
491                if(pWindowInfo->ExStyle&WS_EX_CONTEXTHELP) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_SETCHECK,BST_CHECKED,0);
492                if(pWindowInfo->ExStyle&WS_EX_CONTROLPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_SETCHECK,BST_CHECKED,0);
493                break;
494            }
495        case WM_COMMAND:
496            switch(LOWORD(wParam)){
497                case IDOK:
498                    {
499                        i=GetWndNum(GetWindow(hClient,GW_CHILD));
500
501                        DWORD style;
502                        style=0;
503                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_GETCHECK,0,0))
504                            style|=WS_EX_TOPMOST;
505                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
506                            style|=WS_EX_ACCEPTFILES;
507                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
508                            style|=WS_EX_TRANSPARENT;
509                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_GETCHECK,0,0))
510                            style|=WS_EX_TOOLWINDOW;
511                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
512                            style|=WS_EX_CLIENTEDGE;
513                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
514                            style|=WS_EX_STATICEDGE;
515                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_GETCHECK,0,0))
516                            style|=WS_EX_NOPARENTNOTIFY;
517                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_GETCHECK,0,0))
518                            style|=WS_EX_CONTEXTHELP;
519                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_GETCHECK,0,0))
520                            style|=WS_EX_CONTROLPARENT;
521
522                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
523
524                        if(style==pWindowInfo->ExStyle){
525                            SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
526                            return 1;
527                        }
528
529                        //変更情報
530                        Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,SELECT_WINDOW,pWindowInfo->ExStyle);
531
532                        pWindowInfo->ExStyle=style;
533                        EndDialog(hwnd,1);
534                        return 1;
535                    }
536                case IDCANCEL:
537                    EndDialog(hwnd,0);
538                    return 1;
539            }
540            break;
541    }
542    return 0;
543}
544BOOL CALLBACK RadProperty_WindowProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
545    extern HANDLE hHeap;
546    extern MDIINFO MdiInfo[MAX_WNDNUM];
547    int i,i3,i4;
548    static BOOL bInitial;
549
550    switch(message){
551        case WM_INITDIALOG:
552            {
553                bInitial=1;
554                i=GetWndNum(GetParent(GetParent(hwnd)));
555                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
556
557                SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->GetName().c_str());
558                SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->GetHandleName().c_str());
559                SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
560
561                //"3D FACE(標準)"
562                SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR1);
563                //"色指定"
564                SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR2);
565
566                for(i3=0;i3<projectInfo.res.NumberOfBitmapRes;i3++)
567                    SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)projectInfo.res.pBitmapResInfo[i3].IdName);
568                if(pWindowInfo->type==WNDTYPE_MODALDLG||
569                    pWindowInfo->type==WNDTYPE_MODELESSDLG){
570                    SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
571                    EnableWindow(GetDlgItem(hwnd,IDC_BGCOLOR),0);
572                }
573                else{
574                    if(pWindowInfo->bgColor==COLOR_3DFACE){
575                        //3DFACE
576                        SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
577                    }
578                    else if(pWindowInfo->bgColor<=0){
579                        //色指定
580                        SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0);
581                    }
582                    else if(pWindowInfo->bgColor>=0x1000){
583                        //ビットマップ指定
584                        SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+pWindowInfo->bgColor-0x1000,0);
585                    }
586                }
587
588
589                ////////////
590                // メニュー
591                ////////////
592
593                //"なし"
594                SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)STRING_NONE_);
595
596                for(i3=0,i4=0;i3<projectInfo.NumberOfMenu;i3++){
597                    if(pWindowInfo->MenuID){
598                        if(lstrcmpi(projectInfo.pMenuInfo[i3].IdName,pWindowInfo->MenuID)==0)
599                            i4=i3+1;
600                    }
601                    SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)projectInfo.pMenuInfo[i3].IdName);
602                }
603                if(i4==0&&pWindowInfo->MenuID){
604                    //メニューが存在しない場合、無効にする
605                    HeapDefaultFree(pWindowInfo->MenuID);
606                    pWindowInfo->MenuID=0;
607                    DrawRadWindow(i,pWindowInfo);
608                }
609                SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_SETCURSEL,i4,0);
610
611
612                ////////////
613                // アイコン
614                ////////////
615
616                //"Windowsロゴ(標準)"
617                SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_ICONDEFAULT);
618
619                for(i3=0,i4=0;i3<projectInfo.res.NumberOfIconRes;i3++){
620                    SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)projectInfo.res.pIconResInfo[i3].IdName);
621
622                    if(lstrcmp(pWindowInfo->IconResName,projectInfo.res.pIconResInfo[i3].IdName)==0)
623                        i4=i3+1;
624                }
625                if(i4==0&&pWindowInfo->IconResName){
626                    //アイコンが存在しない場合、無効にする
627                    HeapDefaultFree(pWindowInfo->IconResName);
628                    pWindowInfo->IconResName=0;
629                    DrawRadWindow(i,pWindowInfo);
630                }
631                SendDlgItemMessage(hwnd,IDC_ICONRES,CB_SETCURSEL,i4,0);
632
633
634                ////////////
635                // スタイル
636                ////////////
637
638                //"オーバーラップ"
639                SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_OVERLAPPED);
640                //"ポップアップ"
641                SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_POPUP);
642                //"チャイルド"
643                SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_CHILD);
644
645                if(pWindowInfo->style&WS_POPUP) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,1,0);
646                else if(pWindowInfo->style&WS_CHILD) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,2,0);
647                else SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,0,0);
648
649                //"枠なし"
650                SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_NONE);
651                //"細枠"
652                SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_THICK);
653                //"サイズ変更枠"
654                SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_BORDER);
655
656                //WS_CAPTION(WS_BORDER含む)を考慮してWS_THICKFRAMEを最初に比較する
657                if(pWindowInfo->style&WS_THICKFRAME) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,2,0);
658                else if(pWindowInfo->style&WS_BORDER) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,1,0);
659                else SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,0,0);
660
661                if(pWindowInfo->style&WS_CAPTION) SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
662                if(pWindowInfo->style&WS_SYSMENU) SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_SETCHECK,BST_CHECKED,0);
663                if(pWindowInfo->style&WS_MINIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
664                if(pWindowInfo->style&WS_MAXIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
665                if(pWindowInfo->style&WS_MINIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_SETCHECK,BST_CHECKED,0);
666                if(pWindowInfo->style&WS_MAXIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_SETCHECK,BST_CHECKED,0);
667                if(pWindowInfo->style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
668                if(pWindowInfo->style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
669                if(pWindowInfo->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
670                if(pWindowInfo->style&WS_CLIPSIBLINGS) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_SETCHECK,BST_CHECKED,0);
671                if(pWindowInfo->style&WS_CLIPCHILDREN) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_SETCHECK,BST_CHECKED,0);
672                if(pWindowInfo->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
673
674                SetDlgItemText(hwnd,IDC_SETFONT,pWindowInfo->LogFont.lfFaceName);
675
676                RadProperty_Window_Window_StylingOrder(hwnd,&pWindowInfo->style);
677
678
679                //////////
680                //タイプ
681                switch(pWindowInfo->type){
682                    case WNDTYPE_DEFAULT:
683                        SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_SETCHECK,BST_CHECKED,0);
684                        break;
685                    case WNDTYPE_MODALDLG:
686                        SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_SETCHECK,BST_CHECKED,0);
687                        break;
688                    case WNDTYPE_MODELESSDLG:
689                        SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_SETCHECK,BST_CHECKED,0);
690                        break;
691                }
692
693
694                bInitial=0;
695                break;
696            }
697        case WM_COMMAND:
698            switch(LOWORD(wParam)){
699                case IDC_RENAMEWINDOW:
700                    {
701                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_RENAME),hwnd,(DLGPROC)DlgRadProperty_Window_Rename)) return 1;
702                        i=GetWndNum(GetParent(GetParent(hwnd)));
703                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
704                        SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->GetName().c_str());
705                        SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->GetHandleName().c_str());
706                        return 1;
707                    }
708                case IDC_RENAMECAPTION:
709                    {
710                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1;
711                        i=GetWndNum(GetParent(GetParent(hwnd)));
712                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
713                        SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
714                        return 1;
715                    }
716                case IDC_SETFONT:
717                    {
718                        i=GetWndNum(GetParent(GetParent(hwnd)));
719                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
720                        LOGFONT lf;
721                        lf=pWindowInfo->LogFont;
722                        if(!SetFontDialog(hwnd,&pWindowInfo->LogFont,0)) return 1;
723
724                        //変更情報
725                        Rad_NoticeChanging(i,RAD_UNDO_FONT,SELECT_WINDOW,(DWORD)&lf);
726
727                        SetDlgItemText(hwnd,IDC_SETFONT,pWindowInfo->LogFont.lfFaceName);
728                        DrawRadWindow(i,pWindowInfo);
729                        return 1;
730                    }
731                case IDC_BGCOLOR:
732                    if(HIWORD(wParam)==CBN_SELCHANGE){
733                        i=GetWndNum(GetParent(GetParent(hwnd)));
734                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
735
736                        i3=SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_GETCURSEL,0,0);
737                        if(i3==0){
738                            //3DFACE
739
740                            //変更情報
741                            Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
742
743                            pWindowInfo->bgColor=COLOR_3DFACE;
744                        }
745                        else if(i3==1){
746                            //色指定
747                            CHOOSECOLOR cc;
748                            COLORREF CusColors[16]={
749                                RGB(255,255,255),
750                                RGB(0,0,0),
751                                RGB(128,128,128),
752                                RGB(192,192,192),
753                                RGB(128,0,0),
754                                RGB(255,0,0),
755                                RGB(128,128,0),
756                                RGB(255,255,0),
757                                RGB(0,128,0),
758                                RGB(0,255,0),
759                                RGB(0,128,128),
760                                RGB(0,255,255),
761                                RGB(0,0,128),
762                                RGB(0,0,255),
763                                RGB(128,0,128),
764                                RGB(255,0,255)};
765                            cc.lStructSize=sizeof(CHOOSECOLOR);
766                            cc.hwndOwner=hwnd;
767                            if(pWindowInfo->bgColor<=0)
768                                cc.rgbResult=-pWindowInfo->bgColor;
769                            else cc.rgbResult=RGB(255,255,255);
770                            cc.lpCustColors=CusColors;
771                            cc.Flags=CC_RGBINIT|CC_FULLOPEN;
772                            if(!ChooseColor(&cc)){
773                                //キャンセル動作
774                                if(pWindowInfo->bgColor==COLOR_3DFACE){
775                                    //3DFACE
776                                    SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
777                                }
778                                else if(pWindowInfo->bgColor<=0){
779                                    //色指定
780                                    SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0);
781                                }
782                                else if(pWindowInfo->bgColor>=0x1000){
783                                    //ビットマップ指定
784                                    SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+pWindowInfo->bgColor-0x1000,0);
785                                }
786                                return 1;
787                            }
788
789                            //変更情報
790                            Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
791
792                            pWindowInfo->bgColor=-(int)cc.rgbResult;
793                        }
794                        else{
795                            //ビットマップ
796                            i3-=2;
797
798                            //変更情報
799                            Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
800
801                            pWindowInfo->bgColor=0x1000+i3;
802                        }
803                        DrawRadWindow(i,pWindowInfo);
804                        return 1;
805                    }
806                    break;
807                case IDC_WINDOWMENU:
808                    if(HIWORD(wParam)==CBN_SELCHANGE){
809                        i=GetWndNum(GetParent(GetParent(hwnd)));
810                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
811
812                        //変更情報
813                        Rad_NoticeChanging(i,RAD_UNDO_WINDOWMENU,SELECT_WINDOW,(long)pWindowInfo->MenuID);
814
815                        i3=SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETCURSEL,0,0);
816                        if(pWindowInfo->MenuID)
817                            HeapDefaultFree(pWindowInfo->MenuID);
818                        if(i3==0) pWindowInfo->MenuID=0;
819                        else{
820                            pWindowInfo->MenuID=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXTLEN,i3,0)+1);
821                            SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXT,i3,(long)pWindowInfo->MenuID);
822                        }
823                        DrawRadWindow(i,pWindowInfo);
824                        return 1;
825                    }
826                    break;
827                case IDC_ICONRES:
828                    if(HIWORD(wParam)==CBN_SELCHANGE){
829                        i=GetWndNum(GetParent(GetParent(hwnd)));
830                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
831
832                        //変更情報
833                        Rad_NoticeChanging(i,RAD_UNDO_ICONRES,SELECT_WINDOW,(long)pWindowInfo->IconResName);
834
835                        i3=SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETCURSEL,0,0);
836                        if(pWindowInfo->IconResName)
837                            HeapDefaultFree(pWindowInfo->IconResName);
838                        if(i3==0) pWindowInfo->IconResName=0;
839                        else{
840                            pWindowInfo->IconResName=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXTLEN,i3,0)+1);
841                            SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXT,i3,(long)pWindowInfo->IconResName);
842                        }
843                        DrawRadWindow(i,pWindowInfo);
844                        return 1;
845                    }
846                    break;
847
848                case IDC_WINDOWSTYLE:
849                    if(HIWORD(wParam)==CBN_SELCHANGE){
850                        i=GetWndNum(GetParent(GetParent(hwnd)));
851                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
852
853                        //変更情報
854                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
855
856                        i3=SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_GETCURSEL,0,0);
857                        pWindowInfo->style&=0x3FFFFFFF;
858                        if(i3==1) pWindowInfo->style|=WS_POPUP;
859                        else if(i3==2) pWindowInfo->style|=WS_CHILD;
860                        RadProperty_Window_Window_StylingOrder(hwnd,&pWindowInfo->style);
861                        DrawRadWindow(i,pWindowInfo);
862                        return 1;
863                    }
864                    break;
865                case IDC_BORDERSTYLE:
866                    if(HIWORD(wParam)==CBN_SELCHANGE){
867                        i=GetWndNum(GetParent(GetParent(hwnd)));
868                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
869
870                        //変更情報
871                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
872
873                        i3=SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_GETCURSEL,0,0);
874                        pWindowInfo->style&=~(WS_BORDER|WS_THICKFRAME);
875                        if(i3==1) pWindowInfo->style|=WS_BORDER;
876                        else if(i3==2){
877                            pWindowInfo->style|=WS_BORDER;
878                            pWindowInfo->style|=WS_THICKFRAME;
879                        }
880                        RadProperty_Window_Border_StylingOrder(hwnd,&pWindowInfo->style);
881                        DrawRadWindow(i,pWindowInfo);
882                        return 1;
883                    }
884                    break;
885
886                case IDC_STYLE_CAPTION:
887                    if(HIWORD(wParam)==BN_CLICKED){
888                        i=GetWndNum(GetParent(GetParent(hwnd)));
889                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
890
891                        //変更情報
892                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
893
894                        if(SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_GETCHECK,0,0))
895                            pWindowInfo->style|=WS_CAPTION;
896                        else
897                            pWindowInfo->style&=~WS_CAPTION;
898                        RadProperty_Window_Caption_StylingOrder(hwnd,&pWindowInfo->style);
899                        DrawRadWindow(i,pWindowInfo);
900                        return 1;
901                    }
902                    break;
903                case IDC_STYLE_SYSMENU:
904                    if(HIWORD(wParam)==BN_CLICKED){
905                        i=GetWndNum(GetParent(GetParent(hwnd)));
906                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
907
908                        //変更情報
909                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
910
911                        if(SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_GETCHECK,0,0))
912                            pWindowInfo->style|=WS_SYSMENU;
913                        else
914                            pWindowInfo->style&=~WS_SYSMENU;
915                        DrawRadWindow(i,pWindowInfo);
916                        return 1;
917                    }
918                    break;
919                case IDC_STYLE_MINIMIZEBOX:
920                    if(HIWORD(wParam)==BN_CLICKED){
921                        i=GetWndNum(GetParent(GetParent(hwnd)));
922                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
923
924                        //変更情報
925                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
926
927                        if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_GETCHECK,0,0))
928                            pWindowInfo->style|=WS_MINIMIZEBOX;
929                        else
930                            pWindowInfo->style&=~WS_MINIMIZEBOX;
931                        DrawRadWindow(i,pWindowInfo);
932                        return 1;
933                    }
934                    break;
935                case IDC_STYLE_MAXIMIZEBOX:
936                    if(HIWORD(wParam)==BN_CLICKED){
937                        i=GetWndNum(GetParent(GetParent(hwnd)));
938                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
939
940                        //変更情報
941                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
942
943                        if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_GETCHECK,0,0))
944                            pWindowInfo->style|=WS_MAXIMIZEBOX;
945                        else
946                            pWindowInfo->style&=~WS_MAXIMIZEBOX;
947                        DrawRadWindow(i,pWindowInfo);
948                        return 1;
949                    }
950                    break;
951                case IDC_STYLE_MINIMIZE:
952                    if(HIWORD(wParam)==BN_CLICKED){
953                        i=GetWndNum(GetParent(GetParent(hwnd)));
954                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
955
956                        //変更情報
957                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
958
959                        if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_GETCHECK,0,0))
960                            pWindowInfo->style|=WS_MINIMIZE;
961                        else
962                            pWindowInfo->style&=~WS_MINIMIZE;
963                        DrawRadWindow(i,pWindowInfo);
964                        return 1;
965                    }
966                    break;
967                case IDC_STYLE_MAXIMIZE:
968                    if(HIWORD(wParam)==BN_CLICKED){
969                        i=GetWndNum(GetParent(GetParent(hwnd)));
970                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
971
972                        //変更情報
973                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
974
975                        if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_GETCHECK,0,0))
976                            pWindowInfo->style|=WS_MAXIMIZE;
977                        else
978                            pWindowInfo->style&=~WS_MAXIMIZE;
979                        DrawRadWindow(i,pWindowInfo);
980                        return 1;
981                    }
982                case IDC_STYLE_HSCROLLBAR:
983                    if(HIWORD(wParam)==BN_CLICKED){
984                        i=GetWndNum(GetParent(GetParent(hwnd)));
985                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
986
987                        //変更情報
988                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
989
990                        if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_GETCHECK,0,0))
991                            pWindowInfo->style|=WS_HSCROLL;
992                        else
993                            pWindowInfo->style&=~WS_HSCROLL;
994                        DrawRadWindow(i,pWindowInfo);
995                        return 1;
996                    }
997                case IDC_STYLE_VSCROLLBAR:
998                    if(HIWORD(wParam)==BN_CLICKED){
999                        i=GetWndNum(GetParent(GetParent(hwnd)));
1000                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1001
1002                        //変更情報
1003                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
1004
1005                        if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_GETCHECK,0,0))
1006                            pWindowInfo->style|=WS_VSCROLL;
1007                        else
1008                            pWindowInfo->style&=~WS_VSCROLL;
1009                        DrawRadWindow(i,pWindowInfo);
1010                        return 1;
1011                    }
1012                    break;
1013                case IDC_STYLE_DISABLED:
1014                    if(HIWORD(wParam)==BN_CLICKED){
1015                        i=GetWndNum(GetParent(GetParent(hwnd)));
1016                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1017
1018                        //変更情報
1019                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
1020
1021                        if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0))
1022                            pWindowInfo->style|=WS_DISABLED;
1023                        else
1024                            pWindowInfo->style&=~WS_DISABLED;
1025                        DrawRadWindow(i,pWindowInfo);
1026                        return 1;
1027                    }
1028                    break;
1029                case IDC_STYLE_CLIPSIBLINGS:
1030                    if(HIWORD(wParam)==BN_CLICKED){
1031                        i=GetWndNum(GetParent(GetParent(hwnd)));
1032                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1033
1034                        //変更情報
1035                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
1036
1037                        if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_GETCHECK,0,0))
1038                            pWindowInfo->style|=WS_CLIPSIBLINGS;
1039                        else
1040                            pWindowInfo->style&=~WS_CLIPSIBLINGS;
1041                        DrawRadWindow(i,pWindowInfo);
1042                        return 1;
1043                    }
1044                    break;
1045                case IDC_STYLE_CLIPCHILDREN:
1046                    if(HIWORD(wParam)==BN_CLICKED){
1047                        i=GetWndNum(GetParent(GetParent(hwnd)));
1048                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1049
1050                        //変更情報
1051                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
1052
1053                        if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_GETCHECK,0,0))
1054                            pWindowInfo->style|=WS_CLIPCHILDREN;
1055                        else
1056                            pWindowInfo->style&=~WS_CLIPCHILDREN;
1057                        DrawRadWindow(i,pWindowInfo);
1058                        return 1;
1059                    }
1060                    break;
1061                case IDC_STYLE_VISIBLE:
1062                    if(HIWORD(wParam)==BN_CLICKED){
1063                        i=GetWndNum(GetParent(GetParent(hwnd)));
1064                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1065
1066                        //変更情報
1067                        Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
1068
1069                        if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0))
1070                            pWindowInfo->style|=WS_VISIBLE;
1071                        else
1072                            pWindowInfo->style&=~WS_VISIBLE;
1073                        DrawRadWindow(i,pWindowInfo);
1074                        return 1;
1075                    }
1076                    break;
1077
1078                case IDC_EXSTYLE:
1079                    if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Window_ExStyle)) return 1;
1080                    i=GetWndNum(GetParent(GetParent(hwnd)));
1081                    DrawRadWindow(i,GetWndInfo(MdiInfo[i].path));
1082                    return 1;
1083
1084                case IDC_DEFWINDOW:
1085                case IDC_MODALDLG:
1086                case IDC_MODELESSDLG:
1087                    if(HIWORD(wParam)==BN_CLICKED){
1088                        i=GetWndNum(GetParent(GetParent(hwnd)));
1089                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1090
1091                        //変更情報
1092                        Rad_NoticeChanging(i,RAD_UNDO_TYPE,SELECT_WINDOW,pWindowInfo->type);
1093
1094                        if(SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_GETCHECK,0,0))
1095                            pWindowInfo->type=WNDTYPE_DEFAULT;
1096                        else if(SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_GETCHECK,0,0))
1097                            pWindowInfo->type=WNDTYPE_MODALDLG;
1098                        else if(SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_GETCHECK,0,0))
1099                            pWindowInfo->type=WNDTYPE_MODELESSDLG;
1100                        return 1;
1101                    }
1102                    break;
1103            }
1104            break;
1105    }
1106    return 0;
1107}
1108
1109BOOL CALLBACK DlgRadProperty_Item_RenameCaption(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
1110    extern HANDLE hHeap;
1111    extern MDIINFO MdiInfo[MAX_WNDNUM];
1112    int i,i3;
1113    char *temporary;
1114    POINTANDSIZE PointAndSize;
1115
1116    switch(message){
1117        case WM_INITDIALOG:
1118            {
1119                SetPosCenter(hwnd);
1120                i=GetWndNum(GetWindow(hClient,GW_CHILD));
1121                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1122                if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
1123                    SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
1124                else
1125                    SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
1126                break;
1127            }
1128        case WM_COMMAND:
1129            switch(LOWORD(wParam)){
1130                case IDOK:
1131                    {
1132                        i=GetWndNum(GetWindow(hClient,GW_CHILD));
1133                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1134
1135                        i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_CAPTION))+1;
1136                        temporary=(char *)HeapAlloc(hHeap,0,i3);
1137                        GetDlgItemText(hwnd,IDC_CAPTION,temporary,i3);
1138                        if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
1139                            if(lstrcmp(temporary,pWindowInfo->caption)==0){
1140                                HeapDefaultFree(temporary);
1141                                SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
1142                                return 1;
1143                            }
1144
1145                            //変更情報を更新
1146                            Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->caption);
1147
1148                            HeapDefaultFree(pWindowInfo->caption);
1149                            pWindowInfo->caption=temporary;
1150                        }
1151                        else{
1152                            if(lstrcmp(temporary,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption)==0){
1153                                HeapDefaultFree(temporary);
1154                                SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
1155                                return 1;
1156                            }
1157
1158                            //変更情報を更新
1159                            Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
1160
1161                            HeapDefaultFree(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
1162                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption=temporary;
1163
1164                            if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_STATIC){
1165                                //スタティック テキスト
1166                                //テキストが表示できるようにサイズを拡大する
1167
1168                                PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->pos;
1169                                PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size;
1170                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
1171
1172                                HFONT hFont,hOldFont;
1173                                hFont=CreateFontIndirect(&pWindowInfo->LogFont);
1174                                hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
1175                                GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
1176                                SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
1177                                DeleteObject(hFont);
1178
1179                                //テキストの終端に余裕を持たせる
1180                                PointAndSize.size.cx+=5;
1181
1182                                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cx<PointAndSize.size.cx)
1183                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cx=PointAndSize.size.cx;
1184                            }
1185                            if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_CHECKBOX){
1186                                //チェック ボックス
1187                                //テキストが表示できるようにサイズを拡大する
1188
1189                                PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->pos;
1190                                PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size;
1191                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
1192
1193                                HFONT hFont,hOldFont;
1194                                hFont=CreateFontIndirect(&pWindowInfo->LogFont);
1195                                hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
1196                                GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
1197                                SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
1198                                DeleteObject(hFont);
1199
1200                                //テキストの終端に余裕を持たせる
1201                                PointAndSize.size.cx+=21;
1202
1203                                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cx<PointAndSize.size.cx)
1204                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cx=PointAndSize.size.cx;
1205                            }
1206                            if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_RADIOBUTTON){
1207                                //ラジオ ボックス
1208                                //テキストが表示できるようにサイズを拡大する
1209
1210                                PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->pos;
1211                                PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size;
1212                                Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
1213
1214                                HFONT hFont,hOldFont;
1215                                hFont=CreateFontIndirect(&pWindowInfo->LogFont);
1216                                hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
1217                                GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
1218                                SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
1219                                DeleteObject(hFont);
1220
1221                                //テキストの終端に余裕を持たせる
1222                                PointAndSize.size.cx+=20;
1223
1224                                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cx<PointAndSize.size.cx)
1225                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cx=PointAndSize.size.cx;
1226                            }
1227                        }
1228                        DrawRadWindow(i,pWindowInfo);
1229                        EndDialog(hwnd,1);
1230                        return 1;
1231                    }
1232                case IDCANCEL:
1233                    EndDialog(hwnd,0);
1234                    return 1;
1235            }
1236            break;
1237    }
1238    return 0;
1239}
1240BOOL CALLBACK DlgRadProperty_Item_RenameID(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
1241    extern HANDLE hHeap;
1242    extern HWND hClient,hOwner;
1243    extern MDIINFO MdiInfo[MAX_WNDNUM];
1244    int i,i3;
1245    char *temporary;
1246
1247    switch(message){
1248        case WM_INITDIALOG:
1249            {
1250                SetPosCenter(hwnd);
1251                i=GetWndNum(GetWindow(hClient,GW_CHILD));
1252                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1253                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
1254            }
1255            break;
1256        case WM_COMMAND:
1257            switch(LOWORD(wParam)){
1258                case IDOK:
1259                    {
1260                        i=GetWndNum(GetWindow(hClient,GW_CHILD));
1261                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1262
1263                        i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_IDNAME))+1;
1264                        if(i3==1){
1265                            //MsgBox "ID名を入力して下さい。"
1266                            MessageBox(hOwner,STRING_ITEM_RENAME_MUST_ID,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
1267                            break;
1268                        }
1269                        temporary=(char *)HeapAlloc(hHeap,0,i3);
1270                        GetDlgItemText(hwnd,IDC_IDNAME,temporary,i3);
1271                        if(lstrcmp(temporary,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName)==0){
1272                            HeapDefaultFree(temporary);
1273                            SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
1274                            return 1;
1275                        }
1276
1277                        //MsgBox "アイテムのID名を変更すると、ソースコード内のID名は手動で変換する必要があります。変更しますか?"
1278                        if(IDCANCEL==MessageBox(hwnd,STRING_ITEM_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
1279
1280                        //変更情報を更新
1281                        Rad_NoticeChanging(i,RAD_UNDO_NAME,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
1282
1283                        HeapDefaultFree(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
1284                        pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName=temporary;
1285
1286                        EndDialog(hwnd,1);
1287                        return 1;
1288                    }
1289                case IDCANCEL:
1290                    EndDialog(hwnd,0);
1291                    return 1;
1292            }
1293            break;
1294    }
1295    return 0;
1296}
1297BOOL DefaultItemStyles(HWND hwnd,int WndNum,int WndInfoNum,WPARAM wParam){
1298    extern HANDLE hHeap;
1299    extern MDIINFO MdiInfo[MAX_WNDNUM];
1300
1301    WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
1302
1303    switch(LOWORD(wParam)){
1304        case IDC_RENAMEID:
1305            if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMEID),hwnd,(DLGPROC)DlgRadProperty_Item_RenameID)) return 1;
1306            SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->IdName);
1307            return 1;
1308        case IDC_RENAMECAPTION:
1309            if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1;
1310            SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->caption);
1311            return 1;
1312        case IDC_STYLE_DISABLED:
1313            if(HIWORD(wParam)==BN_CLICKED){
1314                //変更情報
1315                Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style);
1316
1317                if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0))
1318                    pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style|=WS_DISABLED;
1319                else
1320                    pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style&=~WS_DISABLED;
1321                DrawRadWindow(WndNum,pWindowInfo);
1322                return 1;
1323            }
1324            break;
1325        case IDC_STYLE_VISIBLE:
1326            if(HIWORD(wParam)==BN_CLICKED){
1327                //変更情報
1328                Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style);
1329
1330                if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0))
1331                    pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style|=WS_VISIBLE;
1332                else
1333                    pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style&=~WS_VISIBLE;
1334                return 1;
1335            }
1336            break;
1337        case IDC_STYLE_GROUP:
1338            if(HIWORD(wParam)==BN_CLICKED){
1339                //変更情報
1340                Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style);
1341
1342                if(SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_GETCHECK,0,0))
1343                    pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style|=WS_GROUP;
1344                else
1345                    pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style&=~WS_GROUP;
1346                return 1;
1347            }
1348            break;
1349        case IDC_STYLE_TABSTOP:
1350            if(HIWORD(wParam)==BN_CLICKED){
1351                //変更情報
1352                Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style);
1353
1354                if(SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_GETCHECK,0,0))
1355                    pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style|=WS_TABSTOP;
1356                else
1357                    pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style&=~WS_TABSTOP;
1358                return 1;
1359            }
1360            break;
1361    }
1362    return 0;
1363}
1364BOOL CALLBACK DlgRadProperty_Item_ExStyle(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
1365    extern MDIINFO MdiInfo[MAX_WNDNUM];
1366    int i;
1367
1368    switch(message){
1369        case WM_INITDIALOG:
1370            {
1371                SetPosCenter(hwnd);
1372                i=GetWndNum(GetWindow(hClient,GW_CHILD));
1373                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1374                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
1375                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
1376                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle&WS_EX_DLGMODALFRAME) SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_SETCHECK,BST_CHECKED,0);
1377                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
1378                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
1379                break;
1380            }
1381        case WM_COMMAND:
1382            switch(LOWORD(wParam)){
1383                case IDOK:
1384                    {
1385                        i=GetWndNum(GetWindow(hClient,GW_CHILD));
1386                        WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1387
1388                        DWORD style;
1389                        style=0;
1390                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
1391                            style|=WS_EX_ACCEPTFILES;
1392                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
1393                            style|=WS_EX_TRANSPARENT;
1394                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_GETCHECK,0,0))
1395                            style|=WS_EX_DLGMODALFRAME;
1396                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
1397                            style|=WS_EX_CLIENTEDGE;
1398                        if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
1399                            style|=WS_EX_STATICEDGE;
1400
1401                        if(style==pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle){
1402                            SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
1403                            return 1;
1404                        }
1405
1406                        //変更情報
1407                        Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle);
1408
1409                        pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle=style;
1410                        EndDialog(hwnd,1);
1411                        return 1;
1412                    }
1413                case IDCANCEL:
1414                    EndDialog(hwnd,0);
1415                    return 1;
1416            }
1417            break;
1418    }
1419    return 0;
1420}
1421
1422
1423/////////////////////
1424// BUTTON プロパティ
1425
1426BOOL CALLBACK RadProperty_ButtonProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
1427    extern MDIINFO MdiInfo[MAX_WNDNUM];
1428    int i,i2,i3;
1429    static BOOL bInitial;
1430
1431    switch(message){
1432        case WM_INITDIALOG:
1433            {
1434                bInitial=1;
1435                i=GetWndNum(GetParent(GetParent(hwnd)));
1436                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1437
1438                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
1439                SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
1440
1441
1442                ////////////
1443                //スタイル
1444
1445                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
1446                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
1447                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
1448                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
1449
1450                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_OWNERDRAW)==BS_OWNERDRAW) SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_CHECKED,0);
1451                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_DEFPUSHBUTTON) SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_CHECKED,0);
1452
1453                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
1454                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
1455                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
1456                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
1457
1458
1459                //////////////////
1460                // 水平方向の配置
1461                //////////////////
1462
1463                //"デフォルト"
1464                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
1465                //"左端"
1466                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
1467                //"右端"
1468                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
1469                //"中央"
1470                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
1471
1472                //ビットを考慮してBS_CENTERを最初に比較する
1473                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
1474                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
1475                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
1476                else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
1477
1478
1479                //////////////////
1480                // 垂直方向の配置
1481                //////////////////
1482
1483                //"デフォルト"
1484                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
1485                //"上端"
1486                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
1487                //"下端"
1488                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
1489                //"中央"
1490                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
1491
1492                //ビットを考慮してBS_VCENTERを最初に比較する
1493                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
1494                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
1495                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
1496                else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
1497
1498
1499                bInitial=0;
1500                break;
1501            }
1502        case WM_COMMAND:
1503            {
1504                i=GetWndNum(GetParent(GetParent(hwnd)));
1505                if(i==-1) return 1;
1506                i2=GetWndInfoNum(MdiInfo[i].path);
1507                WindowInfo *pWindowInfo = projectInfo.windowInfos[i2];
1508
1509                //共通スタイル
1510                if(bInitial==0){
1511                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
1512                }
1513
1514                switch(LOWORD(wParam)){
1515                    case IDC_BS_DEFPUSHBUTTON:
1516                        if(HIWORD(wParam)==BN_CLICKED){
1517                            //変更情報
1518                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1519
1520                            if(SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_GETCHECK,0,0)){
1521                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_OWNERDRAW;
1522                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_DEFPUSHBUTTON;
1523                                SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_UNCHECKED,0);
1524                            }
1525                            else
1526                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_DEFPUSHBUTTON;
1527                            DrawRadWindow(i,pWindowInfo);
1528                            return 1;
1529                        }
1530                        break;
1531                    case IDC_BS_OWNERDRAW:
1532                        if(HIWORD(wParam)==BN_CLICKED){
1533                            //変更情報
1534                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1535
1536                            if(SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_GETCHECK,0,0)){
1537                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_DEFPUSHBUTTON;
1538                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_OWNERDRAW;
1539                                SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_UNCHECKED,0);
1540                            }
1541                            else
1542                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_OWNERDRAW;
1543                            DrawRadWindow(i,pWindowInfo);
1544                            return 1;
1545                        }
1546                        break;
1547                    case IDC_BS_ICON:
1548                        if(HIWORD(wParam)==BN_CLICKED){
1549                            //変更情報
1550                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1551
1552                            if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
1553                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_ICON;
1554                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
1555                                SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
1556                            }
1557                            else
1558                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
1559                            DrawRadWindow(i,pWindowInfo);
1560                            return 1;
1561                        }
1562                        break;
1563                    case IDC_BS_BITMAP:
1564                        if(HIWORD(wParam)==BN_CLICKED){
1565                            //変更情報
1566                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1567
1568                            if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
1569                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BITMAP;
1570                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
1571                                SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
1572                            }
1573                            else
1574                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
1575                            DrawRadWindow(i,pWindowInfo);
1576                            return 1;
1577                        }
1578                        break;
1579                    case IDC_BS_MULTILINE:
1580                        if(HIWORD(wParam)==BN_CLICKED){
1581                            //変更情報
1582                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1583
1584                            if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
1585                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_MULTILINE;
1586                            else
1587                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_MULTILINE;
1588                            DrawRadWindow(i,pWindowInfo);
1589                            return 1;
1590                        }
1591                        break;
1592                    case IDC_BS_NOTIFY:
1593                        if(HIWORD(wParam)==BN_CLICKED){
1594                            //変更情報
1595                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1596
1597                            if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
1598                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_NOTIFY;
1599                            else
1600                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_NOTIFY;
1601                            return 1;
1602                        }
1603                        break;
1604
1605                    case IDC_BS_HPOS:
1606                        if(HIWORD(wParam)==CBN_SELCHANGE){
1607                            //変更情報
1608                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1609
1610                            i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
1611                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
1612                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_LEFT;
1613                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_RIGHT;
1614                            else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_CENTER;
1615                            DrawRadWindow(i,pWindowInfo);
1616                            return 1;
1617                        }
1618                        break;
1619                    case IDC_BS_VPOS:
1620                        if(HIWORD(wParam)==CBN_SELCHANGE){
1621                            //変更情報
1622                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1623
1624                            i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
1625                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
1626                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_TOP;
1627                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BOTTOM;
1628                            else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_VCENTER;
1629                            DrawRadWindow(i,pWindowInfo);
1630                            return 1;
1631                        }
1632                        break;
1633
1634                    case IDC_EXSTYLE:
1635                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
1636                        DrawRadWindow(i,pWindowInfo);
1637                        return 1;
1638                }
1639                break;
1640            }
1641    }
1642    return 0;
1643}
1644
1645
1646////////////////////////
1647// CHECKBOX プロパティ
1648BOOL CALLBACK RadProperty_CheckBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
1649    extern MDIINFO MdiInfo[MAX_WNDNUM];
1650    int i,i2,i3;
1651    static BOOL bInitial;
1652
1653    switch(message){
1654        case WM_INITDIALOG:
1655            {
1656                bInitial=1;
1657                i=GetWndNum(GetParent(GetParent(hwnd)));
1658                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1659
1660                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
1661                SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
1662
1663
1664                ////////////
1665                //スタイル
1666
1667                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
1668                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
1669                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
1670                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
1671
1672                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_AUTOCHECKBOX)==BS_AUTOCHECKBOX) SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
1673                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_AUTO3STATE)==BS_AUTO3STATE){
1674                    SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
1675                    SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0);
1676                }
1677                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_3STATE)==BS_3STATE) SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0);
1678                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0);
1679                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0);
1680                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
1681                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
1682                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
1683                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
1684
1685
1686                //////////////////
1687                // 水平方向の配置
1688                //////////////////
1689
1690                //"デフォルト"
1691                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
1692                //"左端"
1693                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
1694                //"右端"
1695                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
1696                //"中央"
1697                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
1698
1699                //ビットを考慮してBS_CENTERを最初に比較する
1700                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
1701                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
1702                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
1703                else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
1704
1705
1706                //////////////////
1707                // 垂直方向の配置
1708                //////////////////
1709
1710                //"デフォルト"
1711                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
1712                //"上端"
1713                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
1714                //"下端"
1715                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
1716                //"中央"
1717                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
1718
1719                //ビットを考慮してBS_VCENTERを最初に比較する
1720                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
1721                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
1722                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
1723                else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
1724
1725
1726                bInitial=0;
1727                break;
1728            }
1729        case WM_COMMAND:
1730            {
1731                i=GetWndNum(GetParent(GetParent(hwnd)));
1732                if(i==-1) return 1;
1733                i2=GetWndInfoNum(MdiInfo[i].path);
1734                WindowInfo *pWindowInfo = projectInfo.windowInfos[i2];
1735
1736                //共通スタイル
1737                if(bInitial==0){
1738                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
1739                }
1740
1741                switch(LOWORD(wParam)){
1742                    case IDC_BS_AUTO:
1743                        if(HIWORD(wParam)==BN_CLICKED){
1744                            //変更情報
1745                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1746
1747                            if(SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_GETCHECK,0,0)){
1748                                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x04){
1749                                    //3state
1750                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
1751                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_AUTO3STATE;
1752                                }
1753                                else{
1754                                    //2state
1755                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
1756                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_AUTOCHECKBOX;
1757                                }
1758                            }
1759                            else{
1760                                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x04){
1761                                    //3state
1762                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
1763                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_3STATE;
1764                                }
1765                                else{
1766                                    //2state
1767                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
1768                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_CHECKBOX;
1769                                }
1770                            }
1771                            return 1;
1772                        }
1773                        break;
1774                    case IDC_BS_3STATE:
1775                        if(HIWORD(wParam)==BN_CLICKED){
1776                            //変更情報
1777                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1778
1779                            if(SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_GETCHECK,0,0)){
1780                                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0F)==BS_CHECKBOX){
1781                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
1782                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_3STATE;
1783                                }
1784                                else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0F)==BS_AUTOCHECKBOX){
1785                                    //自動チェック
1786                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
1787                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_AUTO3STATE;
1788                                }
1789                            }
1790                            else{
1791                                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0F)==BS_3STATE){
1792                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
1793                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_CHECKBOX;
1794                                }
1795                                else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0F)==BS_AUTO3STATE){
1796                                    //自動チェック
1797                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
1798                                    pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_AUTOCHECKBOX;
1799                                }
1800                            }
1801                            return 1;
1802                        }
1803                        break;
1804                    case IDC_BS_PUSHLIKE:
1805                        if(HIWORD(wParam)==BN_CLICKED){
1806                            //変更情報
1807                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1808
1809                            if(SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_GETCHECK,0,0))
1810                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_PUSHLIKE;
1811                            else
1812                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_PUSHLIKE;
1813                            DrawRadWindow(i,pWindowInfo);
1814                            return 1;
1815                        }
1816                        break;
1817                    case IDC_BS_LEFTTEXT:
1818                        if(HIWORD(wParam)==BN_CLICKED){
1819                            //変更情報
1820                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1821
1822                            if(SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_GETCHECK,0,0))
1823                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_LEFTTEXT;
1824                            else
1825                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_LEFTTEXT;
1826                            DrawRadWindow(i,pWindowInfo);
1827                            return 1;
1828                        }
1829                        break;
1830                    case IDC_BS_ICON:
1831                        if(HIWORD(wParam)==BN_CLICKED){
1832                            //変更情報
1833                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1834
1835                            if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
1836                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_ICON;
1837                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
1838                                SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
1839                            }
1840                            else
1841                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
1842                            DrawRadWindow(i,pWindowInfo);
1843                            return 1;
1844                        }
1845                        break;
1846                    case IDC_BS_BITMAP:
1847                        if(HIWORD(wParam)==BN_CLICKED){
1848                            //変更情報
1849                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1850
1851                            if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
1852                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BITMAP;
1853                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
1854                                SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
1855                            }
1856                            else
1857                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
1858                            DrawRadWindow(i,pWindowInfo);
1859                            return 1;
1860                        }
1861                        break;
1862                    case IDC_BS_MULTILINE:
1863                        if(HIWORD(wParam)==BN_CLICKED){
1864                            //変更情報
1865                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1866
1867                            if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
1868                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_MULTILINE;
1869                            else
1870                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_MULTILINE;
1871                            DrawRadWindow(i,pWindowInfo);
1872                            return 1;
1873                        }
1874                        break;
1875                    case IDC_BS_NOTIFY:
1876                        if(HIWORD(wParam)==BN_CLICKED){
1877                            //変更情報
1878                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1879
1880                            if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
1881                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_NOTIFY;
1882                            else
1883                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_NOTIFY;
1884                            return 1;
1885                        }
1886                        break;
1887
1888                    case IDC_BS_HPOS:
1889                        if(HIWORD(wParam)==CBN_SELCHANGE){
1890                            //変更情報
1891                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1892
1893                            i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
1894                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
1895                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_LEFT;
1896                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_RIGHT;
1897                            else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_CENTER;
1898                            DrawRadWindow(i,pWindowInfo);
1899                            return 1;
1900                        }
1901                        break;
1902                    case IDC_BS_VPOS:
1903                        if(HIWORD(wParam)==CBN_SELCHANGE){
1904                            //変更情報
1905                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
1906
1907                            i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
1908                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
1909                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_TOP;
1910                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BOTTOM;
1911                            else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_VCENTER;
1912                            DrawRadWindow(i,pWindowInfo);
1913                            return 1;
1914                        }
1915                        break;
1916
1917                    case IDC_EXSTYLE:
1918                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
1919                        DrawRadWindow(i,pWindowInfo);
1920                        return 1;
1921                }
1922            }
1923    }
1924    return 0;
1925}
1926
1927
1928///////////////////////
1929// COMBOBOX プロパティ
1930
1931void RadProperty_ComboBox_StylingOrder(HWND hwnd,DWORD *style){
1932    if(!(*style&(CBS_OWNERDRAWFIXED|CBS_OWNERDRAWVARIABLE))){
1933        *style&=~(CBS_HASSTRINGS);
1934        SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_SETCHECK,BST_UNCHECKED,0);
1935        EnableWindow(GetDlgItem(hwnd,IDC_CBS_HASSTRINGS),0);
1936    }
1937    else EnableWindow(GetDlgItem(hwnd,IDC_CBS_HASSTRINGS),1);
1938}
1939BOOL CALLBACK RadProperty_ComboBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
1940    extern MDIINFO MdiInfo[MAX_WNDNUM];
1941    int i,i2,i3;
1942    static BOOL bInitial;
1943
1944    switch(message){
1945        case WM_INITDIALOG:
1946            {
1947                bInitial=1;
1948                i=GetWndNum(GetParent(GetParent(hwnd)));
1949                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
1950
1951                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
1952
1953
1954                /////////////////////////////////
1955                // スタイル
1956                ////////////
1957
1958                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
1959                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
1960                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
1961                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
1962
1963                ////////
1964                // 選択
1965                ////////
1966
1967                //"デフォルト"
1968                SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_DEFAULT);
1969                //"ドロップ ダウン"
1970                SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWN);
1971                //"ドロップ ダウン リスト"
1972                SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWNLIST);
1973
1974                //ビットを考慮してCBS_DROPDOWNLISTを最初に比較する
1975                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_DROPDOWNLIST)==CBS_DROPDOWNLIST) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,2,0);
1976                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_SIMPLE) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,0,0);
1977                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_DROPDOWN) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,1,0);
1978
1979
1980                ////////////////
1981                // オーナー描画
1982                ////////////////
1983
1984                //"なし"
1985                SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_NONE_);
1986                //"固定"
1987                SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_FIXED);
1988                //"可変"
1989                SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_VARIABLE);
1990
1991                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,1,0);
1992                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_OWNERDRAWVARIABLE) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,2,0);
1993                else SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,0,0);
1994
1995                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_HASSTRINGS) SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_SETCHECK,BST_CHECKED,0);
1996                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_SORT) SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_SETCHECK,BST_CHECKED,0);
1997                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_NOINTEGRALHEIGHT) SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_SETCHECK,BST_CHECKED,0);
1998                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0);
1999                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0);
2000                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0);
2001                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_DISABLENOSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_SETCHECK,BST_CHECKED,0);
2002                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_UPPERCASE) SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_SETCHECK,BST_CHECKED,0);
2003                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_LOWERCASE) SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_SETCHECK,BST_CHECKED,0);
2004
2005                RadProperty_ComboBox_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2006
2007
2008                bInitial=0;
2009                break;
2010            }
2011        case WM_COMMAND:
2012            {
2013                i=GetWndNum(GetParent(GetParent(hwnd)));
2014                if(i==-1) return 1;
2015                i2=GetWndInfoNum(MdiInfo[i].path);
2016                WindowInfo *pWindowInfo = projectInfo.windowInfos[i2];
2017
2018                //共通スタイル
2019                if(bInitial==0){
2020                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
2021                }
2022
2023                switch(LOWORD(wParam)){
2024                    case IDC_CBS_TYPE:
2025                        if(HIWORD(wParam)==CBN_SELCHANGE){
2026                            //変更情報
2027                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2028
2029                            i3=SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_GETCURSEL,0,0);
2030                            //CBS_DROPDOWNLIST=CBS_SIMPLE | CBS_DROPDOWN
2031                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(CBS_DROPDOWNLIST);
2032                            if(i3==0) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_SIMPLE;
2033                            else if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_DROPDOWN;
2034                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_DROPDOWNLIST;
2035
2036                            DrawRadWindow(i,pWindowInfo);
2037                            return 1;
2038                        }
2039                        break;
2040                    case IDC_CBS_OWNERDRAW:
2041                        if(HIWORD(wParam)==CBN_SELCHANGE){
2042                            //変更情報
2043                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2044
2045                            i3=SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_GETCURSEL,0,0);
2046                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(CBS_OWNERDRAWFIXED|CBS_OWNERDRAWVARIABLE);
2047                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_OWNERDRAWFIXED;
2048                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_OWNERDRAWVARIABLE;
2049
2050                            RadProperty_ComboBox_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2051                            return 1;
2052                        }
2053                        break;
2054
2055                    case IDC_CBS_HASSTRINGS:
2056                        if(HIWORD(wParam)==BN_CLICKED){
2057                            //変更情報
2058                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2059
2060                            if(SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_GETCHECK,0,0))
2061                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_HASSTRINGS;
2062                            else
2063                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_HASSTRINGS;
2064                            return 1;
2065                        }
2066                        break;
2067                    case IDC_CBS_SORT:
2068                        if(HIWORD(wParam)==BN_CLICKED){
2069                            //変更情報
2070                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2071
2072                            if(SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_GETCHECK,0,0))
2073                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_SORT;
2074                            else
2075                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_SORT;
2076                            return 1;
2077                        }
2078                        break;
2079                    case IDC_CBS_NOINTEGRALHEIGHT:
2080                        if(HIWORD(wParam)==BN_CLICKED){
2081                            //変更情報
2082                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2083
2084                            if(SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_GETCHECK,0,0))
2085                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_NOINTEGRALHEIGHT;
2086                            else
2087                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_NOINTEGRALHEIGHT;
2088                            return 1;
2089                        }
2090                        break;
2091                    case IDC_CBS_OEMCONVERT:
2092                        if(HIWORD(wParam)==BN_CLICKED){
2093                            //変更情報
2094                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2095
2096                            if(SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_GETCHECK,0,0))
2097                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_OEMCONVERT;
2098                            else
2099                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_OEMCONVERT;
2100                            return 1;
2101                        }
2102                        break;
2103                    case IDC_STYLE_VSCROLL:
2104                        if(HIWORD(wParam)==BN_CLICKED){
2105                            //変更情報
2106                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2107
2108                            if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0))
2109                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=WS_VSCROLL;
2110                            else
2111                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~WS_VSCROLL;
2112                            DrawRadWindow(i,pWindowInfo);
2113                            return 1;
2114                        }
2115                        break;
2116                    case IDC_CBS_AUTOHSCROLL:
2117                        if(HIWORD(wParam)==BN_CLICKED){
2118                            //変更情報
2119                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2120
2121                            if(SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_GETCHECK,0,0))
2122                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_AUTOHSCROLL;
2123                            else
2124                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_AUTOHSCROLL;
2125                            return 1;
2126                        }
2127                        break;
2128                    case IDC_CBS_DISABLENOSCROLL:
2129                        if(HIWORD(wParam)==BN_CLICKED){
2130                            //変更情報
2131                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2132
2133                            if(SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_GETCHECK,0,0))
2134                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_DISABLENOSCROLL;
2135                            else
2136                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_DISABLENOSCROLL;
2137                            DrawRadWindow(i,pWindowInfo);
2138                            return 1;
2139                        }
2140                        break;
2141                    case IDC_CBS_UPPERCASE:
2142                        if(HIWORD(wParam)==BN_CLICKED){
2143                            //変更情報
2144                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2145
2146                            if(SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_GETCHECK,0,0))
2147                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_UPPERCASE;
2148                            else
2149                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_UPPERCASE;
2150                            return 1;
2151                        }
2152                        break;
2153                    case IDC_CBS_LOWERCASE:
2154                        if(HIWORD(wParam)==BN_CLICKED){
2155                            //変更情報
2156                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2157
2158                            if(SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_GETCHECK,0,0))
2159                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_LOWERCASE;
2160                            else
2161                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_LOWERCASE;
2162                            return 1;
2163                        }
2164                        break;
2165
2166                    case IDC_EXSTYLE:
2167                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
2168                        DrawRadWindow(i,pWindowInfo);
2169                        return 1;
2170                }
2171                break;
2172            }
2173    }
2174    return 0;
2175}
2176
2177
2178/////////////////////
2179// EDIT プロパティ
2180
2181void RadProperty_Edit_StylingOrder(HWND hwnd,DWORD *style){
2182    if(*style&ES_MULTILINE){
2183        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_HSCROLL),1);
2184        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_VSCROLL),1);
2185        EnableWindow(GetDlgItem(hwnd,IDC_ES_AUTOVSCROLL),1);
2186
2187        *style&=~(ES_PASSWORD);
2188        SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_SETCHECK,BST_UNCHECKED,0);
2189        EnableWindow(GetDlgItem(hwnd,IDC_ES_PASSWORD),0);
2190    }
2191    else{
2192        EnableWindow(GetDlgItem(hwnd,IDC_ES_PASSWORD),1);
2193
2194        *style&=~(WS_HSCROLL|WS_VSCROLL|ES_AUTOVSCROLL);
2195        SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
2196        SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
2197        SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
2198        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_HSCROLL),0);
2199        EnableWindow(GetDlgItem(hwnd,IDC_STYLE_VSCROLL),0);
2200        EnableWindow(GetDlgItem(hwnd,IDC_ES_AUTOVSCROLL),0);
2201    }
2202}
2203BOOL CALLBACK RadProperty_EditProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
2204    extern MDIINFO MdiInfo[MAX_WNDNUM];
2205    int i,i2,i3;
2206    static BOOL bInitial;
2207
2208    switch(message){
2209        case WM_INITDIALOG:
2210            {
2211                bInitial=1;
2212                i=GetWndNum(GetParent(GetParent(hwnd)));
2213                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
2214
2215                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
2216                SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
2217
2218
2219                ////////////
2220                // スタイル
2221                ////////////
2222
2223                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
2224                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
2225                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
2226                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
2227
2228                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_MULTILINE) SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
2229                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_NUMBER) SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_SETCHECK,BST_CHECKED,0);
2230                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_CHECKED,0);
2231                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0);
2232                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0);
2233                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_AUTOVSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_SETCHECK,BST_CHECKED,0);
2234                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_PASSWORD) SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_SETCHECK,BST_CHECKED,0);
2235                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_NOHIDESEL) SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_SETCHECK,BST_CHECKED,0);
2236                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0);
2237                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_WANTRETURN) SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_SETCHECK,BST_CHECKED,0);
2238                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_UPPERCASE) SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_CHECKED,0);
2239                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_LOWERCASE) SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_CHECKED,0);
2240                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_READONLY) SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_SETCHECK,BST_CHECKED,0);
2241
2242
2243                //////////////////
2244                // テキストの配置
2245                //////////////////
2246
2247                //"左端"
2248                SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
2249                //"中央"
2250                SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
2251                //"右端"
2252                SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
2253
2254                //ビットを考慮してES_LEFTを最後に検討する
2255                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_CENTER) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,1,0);
2256                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_RIGHT) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,2,0);
2257                else SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,0,0);
2258
2259                RadProperty_Edit_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2260
2261
2262                bInitial=0;
2263                break;
2264            }
2265        case WM_COMMAND:
2266            {
2267                i=GetWndNum(GetParent(GetParent(hwnd)));
2268                if(i==-1) return 1;
2269                i2=GetWndInfoNum(MdiInfo[i].path);
2270                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
2271
2272                //共通スタイル
2273                if(bInitial==0){
2274                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
2275                }
2276
2277                switch(LOWORD(wParam)){
2278                    case IDC_ES_MULTILINE:
2279                        if(HIWORD(wParam)==BN_CLICKED){
2280                            //変更情報
2281                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2282
2283                            if(SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_GETCHECK,0,0))
2284                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_MULTILINE;
2285                            else
2286                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_MULTILINE;
2287                            RadProperty_Edit_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2288                            DrawRadWindow(i,pWindowInfo);
2289                            return 1;
2290                        }
2291                        break;
2292                    case IDC_ES_NUMBER:
2293                        if(HIWORD(wParam)==BN_CLICKED){
2294                            //変更情報
2295                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2296
2297                            if(SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_GETCHECK,0,0))
2298                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_NUMBER;
2299                            else
2300                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_NUMBER;
2301                            return 1;
2302                        }
2303                        break;
2304                    case IDC_STYLE_HSCROLL:
2305                        if(HIWORD(wParam)==BN_CLICKED){
2306                            //変更情報
2307                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2308
2309                            if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_GETCHECK,0,0))
2310                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=WS_HSCROLL;
2311                            else
2312                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~WS_HSCROLL;
2313                            DrawRadWindow(i,pWindowInfo);
2314                            return 1;
2315                        }
2316                        break;
2317                    case IDC_ES_AUTOHSCROLL:
2318                        if(HIWORD(wParam)==BN_CLICKED){
2319                            //変更情報
2320                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2321
2322                            if(SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_GETCHECK,0,0))
2323                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_AUTOHSCROLL;
2324                            else
2325                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_AUTOHSCROLL;
2326                            DrawRadWindow(i,pWindowInfo);
2327                            return 1;
2328                        }
2329                        break;
2330                    case IDC_STYLE_VSCROLL:
2331                        if(HIWORD(wParam)==BN_CLICKED){
2332                            //変更情報
2333                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2334
2335                            if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0))
2336                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=WS_VSCROLL;
2337                            else
2338                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~WS_VSCROLL;
2339                            DrawRadWindow(i,pWindowInfo);
2340                            return 1;
2341                        }
2342                        break;
2343                    case IDC_ES_AUTOVSCROLL:
2344                        if(HIWORD(wParam)==BN_CLICKED){
2345                            //変更情報
2346                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2347
2348                            if(SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_GETCHECK,0,0))
2349                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_AUTOVSCROLL;
2350                            else
2351                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_AUTOVSCROLL;
2352                            DrawRadWindow(i,pWindowInfo);
2353                            return 1;
2354                        }
2355                        break;
2356                    case IDC_ES_PASSWORD:
2357                        if(HIWORD(wParam)==BN_CLICKED){
2358                            //変更情報
2359                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2360
2361                            if(SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_GETCHECK,0,0))
2362                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_PASSWORD;
2363                            else
2364                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_PASSWORD;
2365                            DrawRadWindow(i,pWindowInfo);
2366                            return 1;
2367                        }
2368                        break;
2369                    case IDC_ES_NOHIDESEL:
2370                        if(HIWORD(wParam)==BN_CLICKED){
2371                            //変更情報
2372                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2373
2374                            if(SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_GETCHECK,0,0))
2375                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_NOHIDESEL;
2376                            else
2377                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_NOHIDESEL;
2378                            DrawRadWindow(i,pWindowInfo);
2379                            return 1;
2380                        }
2381                        break;
2382                    case IDC_ES_OEMCONVERT:
2383                        if(HIWORD(wParam)==BN_CLICKED){
2384                            //変更情報
2385                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2386
2387                            if(SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_GETCHECK,0,0))
2388                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_OEMCONVERT;
2389                            else
2390                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_OEMCONVERT;
2391                            DrawRadWindow(i,pWindowInfo);
2392                            return 1;
2393                        }
2394                        break;
2395                    case IDC_ES_WANTRETURN:
2396                        if(HIWORD(wParam)==BN_CLICKED){
2397                            //変更情報
2398                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2399
2400                            if(SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_GETCHECK,0,0))
2401                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_WANTRETURN;
2402                            else
2403                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_WANTRETURN;
2404                            DrawRadWindow(i,pWindowInfo);
2405                            return 1;
2406                        }
2407                        break;
2408                    case IDC_ES_UPPERCASE:
2409                        if(HIWORD(wParam)==BN_CLICKED){
2410                            //変更情報
2411                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2412
2413                            if(SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_GETCHECK,0,0)){
2414                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_LOWERCASE;
2415                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_UPPERCASE;
2416                                SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_UNCHECKED,0);
2417                            }
2418                            else
2419                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_UPPERCASE;
2420                            DrawRadWindow(i,pWindowInfo);
2421                            return 1;
2422                        }
2423                        break;
2424                    case IDC_ES_LOWERCASE:
2425                        if(HIWORD(wParam)==BN_CLICKED){
2426                            //変更情報
2427                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2428
2429                            if(SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_GETCHECK,0,0)){
2430                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_UPPERCASE;
2431                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_LOWERCASE;
2432                                SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_UNCHECKED,0);
2433                            }
2434                            else
2435                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_LOWERCASE;
2436                            DrawRadWindow(i,pWindowInfo);
2437                            return 1;
2438                        }
2439                        break;
2440                    case IDC_ES_READONLY:
2441                        if(HIWORD(wParam)==BN_CLICKED){
2442                            //変更情報
2443                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2444
2445                            if(SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_GETCHECK,0,0))
2446                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_READONLY;
2447                            else
2448                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_READONLY;
2449                            DrawRadWindow(i,pWindowInfo);
2450                            return 1;
2451                        }
2452                        break;
2453
2454                    case IDC_ES_TEXTPOS:
2455                        if(HIWORD(wParam)==CBN_SELCHANGE){
2456                            //変更情報
2457                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2458
2459                            i3=SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_GETCURSEL,0,0);
2460                            //ES_LEFT=0
2461                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(ES_CENTER|ES_RIGHT);
2462                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_CENTER;
2463                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_RIGHT;
2464                            DrawRadWindow(i,pWindowInfo);
2465                            return 1;
2466                        }
2467                        break;
2468
2469                    case IDC_EXSTYLE:
2470                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
2471                        DrawRadWindow(i,pWindowInfo);
2472                        return 1;
2473                }
2474                break;
2475            }
2476    }
2477    return 0;
2478}
2479
2480
2481////////////////////////
2482// GROUPBOX プロパティ
2483
2484BOOL CALLBACK RadProperty_GroupBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
2485    extern MDIINFO MdiInfo[MAX_WNDNUM];
2486    int i,i2,i3;
2487    static BOOL bInitial;
2488
2489    switch(message){
2490        case WM_INITDIALOG:
2491            {
2492                bInitial=1;
2493                i=GetWndNum(GetParent(GetParent(hwnd)));
2494                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
2495
2496                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
2497                SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
2498
2499
2500                /////////////////////////////
2501                // スタイル
2502                ////////////
2503
2504                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
2505                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
2506                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
2507                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
2508
2509
2510                //////////////////
2511                // 水平方向の配置
2512                //////////////////
2513
2514                //"デフォルト"
2515                SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_DEFAULT);
2516                //"左端"
2517                SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_LEFT);
2518                //"右端"
2519                SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_RIGHT);
2520                //"中央"
2521                SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_CENTER);
2522
2523                //ビットを考慮してBS_CENTERを最初に検討する
2524                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,3,0);
2525                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,1,0);
2526                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,2,0);
2527                else SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,0,0);
2528
2529                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
2530                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
2531                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
2532
2533
2534                bInitial=0;
2535                break;
2536            }
2537        case WM_COMMAND:
2538            {
2539                i=GetWndNum(GetParent(GetParent(hwnd)));
2540                if(i==-1) return 1;
2541                i2=GetWndInfoNum(MdiInfo[i].path);
2542                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
2543
2544                //共通スタイル
2545                if(bInitial==0){
2546                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
2547                }
2548
2549                switch(LOWORD(wParam)){
2550                    case IDC_BS_POSITION:
2551                        if(HIWORD(wParam)==CBN_SELCHANGE){
2552                            //変更情報
2553                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2554
2555                            i3=SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_GETCURSEL,0,0);
2556                            //BS_CENTER=BS_LEFT | BS_RIGHT
2557                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_CENTER);
2558                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_LEFT;
2559                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_RIGHT;
2560                            else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_CENTER;
2561                            DrawRadWindow(i,pWindowInfo);
2562                            return 1;
2563                        }
2564                        break;
2565
2566                    case IDC_BS_ICON:
2567                        if(HIWORD(wParam)==BN_CLICKED){
2568                            //変更情報
2569                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2570
2571                            if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0))
2572                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_ICON;
2573                            else
2574                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
2575                            DrawRadWindow(i,pWindowInfo);
2576                            return 1;
2577                        }
2578                        break;
2579                    case IDC_BS_BITMAP:
2580                        if(HIWORD(wParam)==BN_CLICKED){
2581                            //変更情報
2582                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2583
2584                            if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0))
2585                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BITMAP;
2586                            else
2587                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
2588                            DrawRadWindow(i,pWindowInfo);
2589                            return 1;
2590                        }
2591                        break;
2592                    case IDC_BS_NOTIFY:
2593                        if(HIWORD(wParam)==BN_CLICKED){
2594                            //変更情報
2595                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2596
2597                            if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
2598                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_NOTIFY;
2599                            else
2600                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_NOTIFY;
2601                            return 1;
2602                        }
2603                        break;
2604
2605                    case IDC_EXSTYLE:
2606                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
2607                        DrawRadWindow(i,pWindowInfo);
2608                        return 1;
2609                }
2610                break;
2611            }
2612    }
2613    return 0;
2614}
2615
2616
2617////////////////////////
2618// IMAGEBOX プロパティ
2619
2620void RadProperty_ImageBox_StylingOrder(HWND hwnd,DWORD *style){
2621    if((*style&0x000F)==SS_ICON||
2622        (*style&0x000F)==SS_BITMAP){
2623        EnableWindow(GetDlgItem(hwnd,IDC_PATH),1);
2624        EnableWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),1);
2625        EnableWindow(GetDlgItem(hwnd,IDC_SS_CENTERIMAGE),1);
2626        EnableWindow(GetDlgItem(hwnd,IDC_SS_RIGHTJUST),1);
2627    }
2628    else{
2629        EnableWindow(GetDlgItem(hwnd,IDC_PATH),0);
2630        EnableWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),0);
2631        EnableWindow(GetDlgItem(hwnd,IDC_SS_CENTERIMAGE),0);
2632        EnableWindow(GetDlgItem(hwnd,IDC_SS_RIGHTJUST),0);
2633    }
2634}
2635BOOL CALLBACK RadProperty_ImageBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
2636    extern HANDLE hHeap;
2637    extern MDIINFO MdiInfo[MAX_WNDNUM];
2638    int i,i2,i3;
2639    char temporary[MAX_PATH];
2640    static BOOL bInitial;
2641
2642    switch(message){
2643        case WM_INITDIALOG:
2644            {
2645                bInitial=1;
2646                i=GetWndNum(GetParent(GetParent(hwnd)));
2647                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
2648
2649                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
2650
2651
2652                /////////////////////////////
2653                // スタイル
2654                ////////////
2655
2656                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
2657                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
2658                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
2659                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
2660
2661                //////////
2662                // タイプ
2663                //////////
2664
2665                //"フレーム(黒)"
2666                SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_BLACK);
2667                //"フレーム(灰色)"
2668                SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_GRAY);
2669                //"フレーム(白)"
2670                SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_WHITE);
2671                //"フレーム(縁取り)"
2672                SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_ETCHED);
2673                //"四角形(黒)"
2674                SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_BLACK);
2675                //"四角形(灰色)"
2676                SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_GRAY);
2677                //"四角形(白)"
2678                SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_WHITE);
2679                //"アイコン"
2680                SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_ICON);
2681                //"ビットマップ"
2682                SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_BITMAP);
2683
2684                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BLACKFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,0,0);
2685                else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_GRAYFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,1,0);
2686                else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_WHITEFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,2,0);
2687                else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000001F)==SS_ETCHEDFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,3,0);
2688                else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BLACKRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,4,0);
2689                else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_GRAYRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,5,0);
2690                else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_WHITERECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,6,0);
2691                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON||
2692                    (pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP){
2693                    if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,7,0);
2694                    else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,8,0);
2695
2696                    //リソース/ファイル スイッチチェックを表示
2697                    ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW);
2698                    ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW);
2699                   
2700                    //イメージ状態テキストを表示
2701                    ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW);
2702
2703                    if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_FILE){
2704                        //ファイル指定を表示
2705                        ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
2706                        ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
2707                        SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
2708
2709                        //イメージ状態テキスト
2710                        //"ファイル指定:"
2711                        SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
2712
2713                        SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
2714                    }
2715                    else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_RES){
2716                        //リソース指定を表示
2717                        ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
2718
2719                        //イメージ状態テキスト
2720                        //"リソース指定:"
2721                        SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
2722
2723                        SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
2724
2725                        SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
2726
2727                        if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON){
2728                            //アイコンリソースをコンボボックスに挿入
2729                            for(i3=0;i3<projectInfo.res.NumberOfIconRes;i3++)
2730                                SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)projectInfo.res.pIconResInfo[i3].IdName);
2731                        }
2732                        else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP){
2733                            //ビットマップリソースをコンボボックスに挿入
2734                            for(i3=0;i3<projectInfo.res.NumberOfBitmapRes;i3++)
2735                                SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)projectInfo.res.pBitmapResInfo[i3].IdName);
2736                        }
2737
2738                        //リストから選択
2739                        i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_FINDSTRING,0,(long)pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
2740                        SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
2741                    }
2742                }
2743
2744                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SS_NOTIFY) SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
2745                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SS_CENTERIMAGE) SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_SETCHECK,BST_CHECKED,0);
2746                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SS_RIGHTJUST) SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_SETCHECK,BST_CHECKED,0);
2747
2748                RadProperty_ImageBox_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2749
2750                bInitial=0;
2751                break;
2752            }
2753        case WM_COMMAND:
2754            {
2755                i=GetWndNum(GetParent(GetParent(hwnd)));
2756                if(i==-1) return 1;
2757                i2=GetWndInfoNum(MdiInfo[i].path);
2758                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
2759
2760                //共通スタイル
2761                if(bInitial==0){
2762                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
2763                }
2764
2765                switch(LOWORD(wParam)){
2766                    case IDC_IMAGE_TYPE:
2767                        if(HIWORD(wParam)==CBN_SELCHANGE){
2768                            //変更情報
2769                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2770
2771                            i3=SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_GETCURSEL,0,0);
2772                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(0x0000001F);
2773                            if(i3==0) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_BLACKFRAME;
2774                            else if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_GRAYFRAME;
2775                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_WHITEFRAME;
2776                            else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_ETCHEDFRAME;
2777                            else if(i3==4) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_BLACKRECT;
2778                            else if(i3==5) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_GRAYRECT;
2779                            else if(i3==6) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_WHITERECT;
2780                            else if(i3==7) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_ICON;
2781                            else if(i3==8) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_BITMAP;
2782
2783                            if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON||
2784                                (pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP){
2785                                //リソース/ファイル スイッチチェックを表示
2786                                ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW);
2787                                ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW);
2788
2789                                //イメージ状態テキストを表示
2790                                ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW);
2791
2792                                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_FILE){
2793                                    //ファイル指定を表示
2794                                    ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
2795                                    ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
2796                                    SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
2797
2798                                    //イメージ状態テキスト
2799                                    //"ファイル指定:"
2800                                    SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
2801
2802                                    SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
2803                                }
2804                                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_RES){
2805                                    //リソース指定を表示
2806                                    ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
2807
2808                                    //イメージ状態テキスト
2809                                    //"リソース指定:"
2810                                    SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
2811
2812                                    SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
2813
2814                                    SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
2815
2816                                    if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON){
2817                                        //アイコンリソースをコンボボックスに挿入
2818                                        for(i3=0;i3<projectInfo.res.NumberOfIconRes;i3++){
2819                                            SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)projectInfo.res.pIconResInfo[i3].IdName);
2820
2821                                            if(lstrcmp(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path,projectInfo.res.pIconResInfo[i3].IdName)==0)
2822                                                SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
2823                                        }
2824                                    }
2825                                    else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP){
2826                                        //ビットマップリソースをコンボボックスに挿入
2827                                        for(i3=0;i3<projectInfo.res.NumberOfBitmapRes;i3++){
2828                                            SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)projectInfo.res.pBitmapResInfo[i3].IdName);
2829
2830                                            if(lstrcmp(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path,projectInfo.res.pBitmapResInfo[i3].IdName)==0)
2831                                                SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
2832                                        }
2833                                    }
2834                                }
2835                            }
2836                            else{
2837                                //リソース/ファイル スイッチチェックを非表示
2838                                ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_HIDE);
2839                                ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_HIDE);
2840
2841                                //イメージ状態テキストを非表示
2842                                ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_HIDE);
2843
2844                                //ファイル指定を非表示
2845                                ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE);
2846                                ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE);
2847
2848                                //リソース指定を非表示
2849                                ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE);
2850                            }
2851
2852                            RadProperty_ImageBox_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2853                            DrawRadWindow(i,pWindowInfo);
2854                            return 1;
2855                        }
2856                        break;
2857
2858                    case IDC_FILE:
2859                        if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_FILE){
2860                            //変更無し
2861                            break;
2862                        }
2863
2864                        //変更情報
2865                        Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo);
2866
2867                        pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type=IMGTYPE_FILE;
2868
2869                        //ファイル指定を表示
2870                        ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
2871                        ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
2872                        SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
2873
2874                        //リソース指定を非表示
2875                        ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE);
2876
2877                        //イメージ状態テキスト
2878                        //"ファイル指定:"
2879                        SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
2880
2881                        SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
2882                        break;
2883
2884                    case IDC_RESOURCE:
2885                        if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_RES){
2886                            //変更無し
2887                            break;
2888                        }
2889
2890                        //変更情報
2891                        Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo);
2892
2893                        pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type=IMGTYPE_RES;
2894
2895                        //ファイル指定を非表示
2896                        ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE);
2897                        ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE);
2898
2899                        //リソース指定を表示
2900                        ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
2901
2902                        //イメージ状態テキスト
2903                        //"リソース指定:"
2904                        SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
2905
2906                        SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
2907
2908                        SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
2909
2910                        if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON){
2911                            //アイコンリソースをコンボボックスに挿入
2912                            for(i3=0;i3<projectInfo.res.NumberOfIconRes;i3++)
2913                                SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)projectInfo.res.pIconResInfo[i3].IdName);
2914                        }
2915                        else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP){
2916                            //ビットマップリソースをコンボボックスに挿入
2917                            for(i3=0;i3<projectInfo.res.NumberOfBitmapRes;i3++)
2918                                SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)projectInfo.res.pBitmapResInfo[i3].IdName);
2919                        }
2920                        break;
2921
2922                    case IDC_RESCOMBO:
2923                        if(HIWORD(wParam)==CBN_SELCHANGE){
2924                            //変更情報
2925                            Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo);
2926
2927                            i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETCURSEL,0,0);
2928                            SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETLBTEXT,i3,(long)temporary);
2929
2930                            HeapDefaultFree(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
2931                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
2932                            lstrcpy(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path,temporary);
2933
2934                            DrawRadWindow(i,pWindowInfo);
2935                        }
2936                        break;
2937
2938                    case IDC_CHANGEPATH:
2939                        if(HIWORD(wParam)==BN_CLICKED){
2940                            if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_FILE){
2941                                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x000F)==SS_ICON){
2942                                    extern LPSTR IconFileFilter;
2943                                    //"アイコン ファイルを指定して下さい"
2944                                    if(!GetFilePathDialog(hwnd,temporary,IconFileFilter,STRING_IMAGEBOXPROP_GETPATH_ICON,1)) return 1;
2945                                }
2946                                else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x000F)==SS_BITMAP){
2947                                    extern LPSTR BitmapFileFilter;
2948                                    //"ビットマップ ファイルを指定して下さい"
2949                                    if(!GetFilePathDialog(hwnd,temporary,BitmapFileFilter,STRING_IMAGEBOXPROP_GETPATH_BITMAP,1)) return 1;
2950                                }
2951
2952                                //変更情報
2953                                Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo);
2954
2955                                GetRelationalPath(temporary,projectInfo.dir);
2956                                HeapDefaultFree(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
2957                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
2958                                lstrcpy(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path,temporary);
2959
2960                                SetDlgItemText(hwnd,IDC_PATH,temporary);
2961                                DrawRadWindow(i,pWindowInfo);
2962                            }
2963                            return 1;
2964                        }
2965                        break;
2966
2967                    case IDC_SS_NOTIFY:
2968                        if(HIWORD(wParam)==BN_CLICKED){
2969                            //変更情報
2970                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2971
2972                            if(SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_GETCHECK,0,0))
2973                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_NOTIFY;
2974                            else
2975                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~SS_NOTIFY;
2976                            return 1;
2977                        }
2978                        break;
2979                    case IDC_SS_CENTERIMAGE:
2980                        if(HIWORD(wParam)==BN_CLICKED){
2981                            //変更情報
2982                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2983
2984                            if(SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_GETCHECK,0,0))
2985                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_CENTERIMAGE;
2986                            else
2987                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~SS_CENTERIMAGE;
2988                            return 1;
2989                        }
2990                        break;
2991                    case IDC_SS_RIGHTJUST:
2992                        if(HIWORD(wParam)==BN_CLICKED){
2993                            //変更情報
2994                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
2995
2996                            if(SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_GETCHECK,0,0))
2997                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_RIGHTJUST;
2998                            else
2999                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~SS_RIGHTJUST;
3000                            return 1;
3001                        }
3002                        break;
3003
3004                    case IDC_EXSTYLE:
3005                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
3006                        DrawRadWindow(i,pWindowInfo);
3007                        return 1;
3008                }
3009                break;
3010            }
3011    }
3012    return 0;
3013}
3014
3015
3016////////////////////////
3017// LISTVIEW プロパティ
3018BOOL CALLBACK RadProperty_ListViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
3019    extern MDIINFO MdiInfo[MAX_WNDNUM];
3020    int i,i2,i3;
3021    static BOOL bInitial;
3022
3023    switch(message){
3024        case WM_INITDIALOG:
3025            {
3026                bInitial=1;
3027                i=GetWndNum(GetParent(GetParent(hwnd)));
3028                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
3029
3030                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
3031
3032
3033                /////////////////////////
3034                // スタイル
3035                ////////////
3036
3037                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
3038                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
3039                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
3040                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
3041
3042                ////////
3043                // 表示
3044                ////////
3045
3046                //"アイコン"
3047                SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_ICON);
3048                //"小さいアイコン"
3049                SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_SMALLICON);
3050                //"リスト"
3051                SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_LIST);
3052                //"レポート"
3053                SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_REPORT);
3054
3055                //ビットを考慮してLVS_LISTを最初に比較する
3056                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_LIST)==LVS_LIST) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,2,0);
3057                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_SMALLICON) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,1,0);
3058                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_REPORT) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,3,0);
3059                else SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,0,0);
3060
3061
3062                ////////
3063                // 配置
3064                ////////
3065
3066                //"上端"
3067                SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_ADDSTRING,0,(long)STRING_TOP);
3068                //"左端"
3069                SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_ADDSTRING,0,(long)STRING_LEFT);
3070
3071                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_ALIGNLEFT) SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_SETCURSEL,1,0);
3072                else SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_SETCURSEL,0,0);
3073
3074
3075                //////////
3076                // ソート
3077                //////////
3078
3079                //"なし"
3080                SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_NONE_);
3081                //"昇順"
3082                SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_SORT_ASCENDING);
3083                //"降順"
3084                SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_SORT_DESCENDING);
3085
3086                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_SORTASCENDING) SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,1,0);
3087                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_SORTDESCENDING) SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,2,0);
3088                else SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,0,0);
3089
3090                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_SINGLESEL) SendDlgItemMessage(hwnd,IDC_LVS_SINGLESEL,BM_SETCHECK,BST_CHECKED,0);
3091                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_AUTOARRANGE) SendDlgItemMessage(hwnd,IDC_LVS_AUTOARRANGE,BM_SETCHECK,BST_CHECKED,0);
3092                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_NOLABELWRAP) SendDlgItemMessage(hwnd,IDC_LVS_NOLABELWRAP,BM_SETCHECK,BST_CHECKED,0);
3093                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_EDITLABELS) SendDlgItemMessage(hwnd,IDC_LVS_EDITLABELS,BM_SETCHECK,BST_CHECKED,0);
3094                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_NOSCROLL) SendDlgItemMessage(hwnd,IDC_LVS_NOSCROLL,BM_SETCHECK,BST_CHECKED,0);
3095                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_NOCOLUMNHEADER) SendDlgItemMessage(hwnd,IDC_LVS_NOCOLUMNHEADER,BM_SETCHECK,BST_CHECKED,0);
3096                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_NOSORTHEADER) SendDlgItemMessage(hwnd,IDC_LVS_NOSORTHEADER,BM_SETCHECK,BST_CHECKED,0);
3097                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_SHOWSELALWAYS) SendDlgItemMessage(hwnd,IDC_LVS_SHOWSELALWAYS,BM_SETCHECK,BST_CHECKED,0);
3098                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_LVS_OWNERDRAWFIXED,BM_SETCHECK,BST_CHECKED,0);
3099                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_SHAREIMAGELISTS) SendDlgItemMessage(hwnd,IDC_LVS_SHAREIMAGELISTS,BM_SETCHECK,BST_CHECKED,0);
3100
3101
3102                bInitial=0;
3103                break;
3104            }
3105        case WM_COMMAND:
3106            {
3107                i=GetWndNum(GetParent(GetParent(hwnd)));
3108                if(i==-1) return 1;
3109                i2=GetWndInfoNum(MdiInfo[i].path);
3110                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
3111
3112                //共通スタイル
3113                if(bInitial==0){
3114                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
3115                }
3116
3117                switch(LOWORD(wParam)){
3118                    case IDC_LVS_VIEW:
3119                        if(HIWORD(wParam)==CBN_SELCHANGE){
3120                            //変更情報
3121                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3122
3123                            i3=SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_GETCURSEL,0,0);
3124                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(LVS_SMALLICON|LVS_LIST|LVS_REPORT);
3125                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_SMALLICON;
3126                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_LIST;
3127                            else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_REPORT;
3128                            DrawRadWindow(i,pWindowInfo);
3129                            return 1;
3130                        }
3131                        break;
3132                    case IDC_LVS_POSITION:
3133                        if(HIWORD(wParam)==CBN_SELCHANGE){
3134                            //変更情報
3135                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3136
3137                            i3=SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_GETCURSEL,0,0);
3138                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(LVS_ALIGNLEFT);
3139                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_ALIGNLEFT;
3140                            return 1;
3141                        }
3142                        break;
3143                    case IDC_LVS_SORT:
3144                        if(HIWORD(wParam)==CBN_SELCHANGE){
3145                            //変更情報
3146                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3147
3148                            i3=SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_GETCURSEL,0,0);
3149                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(LVS_SORTASCENDING|LVS_SORTDESCENDING);
3150                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_SORTASCENDING;
3151                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_SORTDESCENDING;
3152                            return 1;
3153                        }
3154                        break;
3155
3156                    case IDC_LVS_SINGLESEL:
3157                        if(HIWORD(wParam)==BN_CLICKED){
3158                            //変更情報
3159                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3160
3161                            if(SendDlgItemMessage(hwnd,IDC_LVS_SINGLESEL,BM_GETCHECK,0,0))
3162                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_SINGLESEL;
3163                            else
3164                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LVS_SINGLESEL;
3165                            return 1;
3166                        }
3167                        break;
3168                    case IDC_LVS_AUTOARRANGE:
3169                        if(HIWORD(wParam)==BN_CLICKED){
3170                            //変更情報
3171                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3172
3173                            if(SendDlgItemMessage(hwnd,IDC_LVS_AUTOARRANGE,BM_GETCHECK,0,0))
3174                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_AUTOARRANGE;
3175                            else
3176                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LVS_AUTOARRANGE;
3177                            return 1;
3178                        }
3179                        break;
3180                    case IDC_LVS_NOLABELWRAP:
3181                        if(HIWORD(wParam)==BN_CLICKED){
3182                            //変更情報
3183                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3184
3185                            if(SendDlgItemMessage(hwnd,IDC_LVS_NOLABELWRAP,BM_GETCHECK,0,0))
3186                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_NOLABELWRAP;
3187                            else
3188                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LVS_NOLABELWRAP;
3189                            return 1;
3190                        }
3191                        break;
3192                    case IDC_LVS_EDITLABELS:
3193                        if(HIWORD(wParam)==BN_CLICKED){
3194                            //変更情報
3195                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3196
3197                            if(SendDlgItemMessage(hwnd,IDC_LVS_EDITLABELS,BM_GETCHECK,0,0))
3198                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_EDITLABELS;
3199                            else
3200                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LVS_EDITLABELS;
3201                            return 1;
3202                        }
3203                        break;
3204                    case IDC_LVS_NOSCROLL:
3205                        if(HIWORD(wParam)==BN_CLICKED){
3206                            //変更情報
3207                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3208
3209                            if(SendDlgItemMessage(hwnd,IDC_LVS_NOSCROLL,BM_GETCHECK,0,0))
3210                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_NOSCROLL;
3211                            else
3212                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LVS_NOSCROLL;
3213                            DrawRadWindow(i,pWindowInfo);
3214                            return 1;
3215                        }
3216                        break;
3217                    case IDC_LVS_NOCOLUMNHEADER:
3218                        if(HIWORD(wParam)==BN_CLICKED){
3219                            //変更情報
3220                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3221
3222                            if(SendDlgItemMessage(hwnd,IDC_LVS_NOCOLUMNHEADER,BM_GETCHECK,0,0))
3223                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_NOCOLUMNHEADER;
3224                            else
3225                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LVS_NOCOLUMNHEADER;
3226                            return 1;
3227                        }
3228                        break;
3229                    case IDC_LVS_NOSORTHEADER:
3230                        if(HIWORD(wParam)==BN_CLICKED){
3231                            //変更情報
3232                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3233
3234                            if(SendDlgItemMessage(hwnd,IDC_LVS_NOSORTHEADER,BM_GETCHECK,0,0))
3235                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_NOSORTHEADER;
3236                            else
3237                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LVS_NOSORTHEADER;
3238                            return 1;
3239                        }
3240                        break;
3241                    case IDC_LVS_SHOWSELALWAYS:
3242                        if(HIWORD(wParam)==BN_CLICKED){
3243                            //変更情報
3244                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3245
3246                            if(SendDlgItemMessage(hwnd,IDC_LVS_SHOWSELALWAYS,BM_GETCHECK,0,0))
3247                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_SHOWSELALWAYS;
3248                            else
3249                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LVS_SHOWSELALWAYS;
3250                            return 1;
3251                        }
3252                        break;
3253                    case IDC_LVS_OWNERDRAWFIXED:
3254                        if(HIWORD(wParam)==BN_CLICKED){
3255                            //変更情報
3256                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3257
3258                            if(SendDlgItemMessage(hwnd,IDC_LVS_OWNERDRAWFIXED,BM_GETCHECK,0,0))
3259                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_OWNERDRAWFIXED;
3260                            else
3261                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LVS_OWNERDRAWFIXED;
3262                            return 1;
3263                        }
3264                        break;
3265                    case IDC_LVS_SHAREIMAGELISTS:
3266                        if(HIWORD(wParam)==BN_CLICKED){
3267                            //変更情報
3268                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3269
3270                            if(SendDlgItemMessage(hwnd,IDC_LVS_SHAREIMAGELISTS,BM_GETCHECK,0,0))
3271                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LVS_SHAREIMAGELISTS;
3272                            else
3273                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LVS_SHAREIMAGELISTS;
3274                            return 1;
3275                        }
3276                        break;
3277
3278                    case IDC_EXSTYLE:
3279                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
3280                        DrawRadWindow(i,pWindowInfo);
3281                        return 1;
3282                }
3283                break;
3284            }
3285    }
3286    return 0;
3287}
3288
3289
3290///////////////////////
3291// LISTBOX プロパティ
3292
3293void RadProperty_ListBox_StylingOrder(HWND hwnd,DWORD *style){
3294    if(*style&LBS_OWNERDRAWVARIABLE){
3295        *style&=~(LBS_MULTICOLUMN);
3296        SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_SETCHECK,BST_UNCHECKED,0);
3297        EnableWindow(GetDlgItem(hwnd,IDC_LBS_MULTICOLUMN),0);
3298    }
3299    else
3300        EnableWindow(GetDlgItem(hwnd,IDC_LBS_MULTICOLUMN),1);
3301
3302    if(!(*style&(LBS_OWNERDRAWFIXED|LBS_OWNERDRAWVARIABLE))){
3303        *style&=~(LBS_HASSTRINGS);
3304        SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_SETCHECK,BST_UNCHECKED,0);
3305        EnableWindow(GetDlgItem(hwnd,IDC_LBS_HASSTRINGS),0);
3306    }
3307    else
3308        EnableWindow(GetDlgItem(hwnd,IDC_LBS_HASSTRINGS),1);
3309}
3310BOOL CALLBACK RadProperty_ListBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
3311    extern MDIINFO MdiInfo[MAX_WNDNUM];
3312    int i,i2,i3;
3313    static BOOL bInitial;
3314
3315    switch(message){
3316        case WM_INITDIALOG:
3317            {
3318                bInitial=1;
3319                i=GetWndNum(GetParent(GetParent(hwnd)));
3320                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
3321
3322                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
3323
3324
3325                ////////////////////////
3326                // スタイル
3327                ////////////
3328
3329                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
3330                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
3331                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
3332                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
3333
3334                ////////
3335                // 選択
3336                ////////
3337
3338                //"シングル"
3339                SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_SINGLE);
3340                //"マルチ"
3341                SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_MULTI);
3342                //"拡張"
3343                SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_EXTENDED);
3344                //"なし"
3345                SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_NONE_);
3346
3347                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_MULTIPLESEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,1,0);
3348                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_EXTENDEDSEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,2,0);
3349                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_NOSEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,3,0);
3350                else SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,0,0);
3351
3352
3353                ////////////////
3354                // オーナー描画
3355                ////////////////
3356
3357                //"なし"
3358                SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_NONE_);
3359                //"固定"
3360                SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_FIXED);
3361                //"可変"
3362                SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_VARIABLE);
3363
3364                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,1,0);
3365                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_OWNERDRAWVARIABLE) SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,2,0);
3366                else SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,0,0);
3367
3368                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_HASSTRINGS) SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_SETCHECK,BST_CHECKED,0);
3369                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_SORT) SendDlgItemMessage(hwnd,IDC_LBS_SORT,BM_SETCHECK,BST_CHECKED,0);
3370                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_NOTIFY) SendDlgItemMessage(hwnd,IDC_LBS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
3371                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_MULTICOLUMN) SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_SETCHECK,BST_CHECKED,0);
3372                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_CHECKED,0);
3373                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0);
3374                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_DISABLENOSCROLL) SendDlgItemMessage(hwnd,IDC_LBS_DISABLENOSCROLL,BM_SETCHECK,BST_CHECKED,0);
3375                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_NOREDRAW) SendDlgItemMessage(hwnd,IDC_LBS_NOREDRAW,BM_SETCHECK,BST_CHECKED,0);
3376                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_USETABSTOPS) SendDlgItemMessage(hwnd,IDC_LBS_USETABSTOPS,BM_SETCHECK,BST_CHECKED,0);
3377                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LBS_WANTKEYBOARDINPUT) SendDlgItemMessage(hwnd,IDC_LBS_WANTKEYBOARDINPUT,BM_SETCHECK,BST_CHECKED,0);
3378
3379                RadProperty_ListBox_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3380
3381
3382                bInitial=0;
3383                break;
3384            }
3385        case WM_COMMAND:
3386            {
3387                i=GetWndNum(GetParent(GetParent(hwnd)));
3388                if(i==-1) return 1;
3389                i2=GetWndInfoNum(MdiInfo[i].path);
3390                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
3391
3392                //共通スタイル
3393                if(bInitial==0){
3394                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
3395                }
3396
3397                switch(LOWORD(wParam)){
3398                    case IDC_LBS_SELECT:
3399                        if(HIWORD(wParam)==CBN_SELCHANGE){
3400                            //変更情報
3401                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3402
3403                            i3=SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_GETCURSEL,0,0);
3404                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(LBS_MULTIPLESEL|LBS_EXTENDEDSEL|LBS_NOSEL);
3405                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_MULTIPLESEL;
3406                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_EXTENDEDSEL;
3407                            else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_NOSEL;
3408                            return 1;
3409                        }
3410                        break;
3411                    case IDC_LBS_OWNERDRAW:
3412                        if(HIWORD(wParam)==CBN_SELCHANGE){
3413                            //変更情報
3414                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3415
3416                            i3=SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_GETCURSEL,0,0);
3417                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(LBS_OWNERDRAWFIXED|LBS_OWNERDRAWVARIABLE);
3418                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_OWNERDRAWFIXED;
3419                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_OWNERDRAWVARIABLE;
3420
3421                            RadProperty_ListBox_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3422                            return 1;
3423                        }
3424                        break;
3425
3426                    case IDC_LBS_HASSTRINGS:
3427                        if(HIWORD(wParam)==BN_CLICKED){
3428                            //変更情報
3429                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3430
3431                            if(SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_GETCHECK,0,0))
3432                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_HASSTRINGS;
3433                            else
3434                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LBS_HASSTRINGS;
3435                            return 1;
3436                        }
3437                        break;
3438                    case IDC_LBS_SORT:
3439                        if(HIWORD(wParam)==BN_CLICKED){
3440                            //変更情報
3441                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3442
3443                            if(SendDlgItemMessage(hwnd,IDC_LBS_SORT,BM_GETCHECK,0,0))
3444                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_SORT;
3445                            else
3446                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LBS_SORT;
3447                            return 1;
3448                        }
3449                        break;
3450                    case IDC_LBS_NOTIFY:
3451                        if(HIWORD(wParam)==BN_CLICKED){
3452                            //変更情報
3453                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3454
3455                            if(SendDlgItemMessage(hwnd,IDC_LBS_NOTIFY,BM_GETCHECK,0,0))
3456                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_NOTIFY;
3457                            else
3458                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LBS_NOTIFY;
3459                            return 1;
3460                        }
3461                        break;
3462                    case IDC_LBS_MULTICOLUMN:
3463                        if(HIWORD(wParam)==BN_CLICKED){
3464                            //変更情報
3465                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3466
3467                            if(SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_GETCHECK,0,0))
3468                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_MULTICOLUMN;
3469                            else
3470                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LBS_MULTICOLUMN;
3471                            return 1;
3472                        }
3473                        break;
3474                    case IDC_STYLE_HSCROLL:
3475                        if(HIWORD(wParam)==BN_CLICKED){
3476                            //変更情報
3477                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3478
3479                            if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_GETCHECK,0,0))
3480                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=WS_HSCROLL;
3481                            else
3482                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~WS_HSCROLL;
3483                            DrawRadWindow(i,pWindowInfo);
3484                            return 1;
3485                        }
3486                        break;
3487                    case IDC_STYLE_VSCROLL:
3488                        if(HIWORD(wParam)==BN_CLICKED){
3489                            //変更情報
3490                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3491
3492                            if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0))
3493                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=WS_VSCROLL;
3494                            else
3495                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~WS_VSCROLL;
3496                            DrawRadWindow(i,pWindowInfo);
3497                            return 1;
3498                        }
3499                        break;
3500                    case IDC_LBS_DISABLENOSCROLL:
3501                        if(HIWORD(wParam)==BN_CLICKED){
3502                            //変更情報
3503                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3504
3505                            if(SendDlgItemMessage(hwnd,IDC_LBS_DISABLENOSCROLL,BM_GETCHECK,0,0))
3506                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_DISABLENOSCROLL;
3507                            else
3508                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LBS_DISABLENOSCROLL;
3509                            DrawRadWindow(i,pWindowInfo);
3510                            return 1;
3511                        }
3512                        break;
3513                    case IDC_LBS_NOREDRAW:
3514                        if(HIWORD(wParam)==BN_CLICKED){
3515                            //変更情報
3516                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3517
3518                            if(SendDlgItemMessage(hwnd,IDC_LBS_NOREDRAW,BM_GETCHECK,0,0))
3519                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_NOREDRAW;
3520                            else
3521                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LBS_NOREDRAW;
3522                            return 1;
3523                        }
3524                        break;
3525                    case IDC_LBS_USETABSTOPS:
3526                        if(HIWORD(wParam)==BN_CLICKED){
3527                            //変更情報
3528                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3529
3530                            if(SendDlgItemMessage(hwnd,IDC_LBS_USETABSTOPS,BM_GETCHECK,0,0))
3531                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_USETABSTOPS;
3532                            else
3533                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LBS_USETABSTOPS;
3534                            return 1;
3535                        }
3536                        break;
3537                    case IDC_LBS_WANTKEYBOARDINPUT:
3538                        if(HIWORD(wParam)==BN_CLICKED){
3539                            //変更情報
3540                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3541
3542                            if(SendDlgItemMessage(hwnd,IDC_LBS_WANTKEYBOARDINPUT,BM_GETCHECK,0,0))
3543                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=LBS_WANTKEYBOARDINPUT;
3544                            else
3545                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~LBS_WANTKEYBOARDINPUT;
3546                            return 1;
3547                        }
3548                        break;
3549
3550                    case IDC_EXSTYLE:
3551                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
3552                        DrawRadWindow(i,pWindowInfo);
3553                        return 1;
3554                }
3555                break;
3556            }
3557    }
3558    return 0;
3559}
3560
3561
3562///////////////////////////
3563// PROGRESSBAR プロパティ
3564BOOL CALLBACK RadProperty_ProgressBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
3565    extern MDIINFO MdiInfo[MAX_WNDNUM];
3566    int i,i2;
3567    static BOOL bInitial;
3568
3569    switch(message){
3570        case WM_INITDIALOG:
3571            {
3572                bInitial=1;
3573                i=GetWndNum(GetParent(GetParent(hwnd)));
3574                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
3575
3576                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
3577                SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
3578
3579
3580                ////////////
3581                //スタイル
3582
3583                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
3584                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
3585                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
3586                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
3587
3588                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&PBS_VERTICAL) SendDlgItemMessage(hwnd,IDC_PBS_VERTICAL,BM_SETCHECK,BST_CHECKED,0);
3589                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&PBS_SMOOTH) SendDlgItemMessage(hwnd,IDC_PBS_SMOOTH,BM_SETCHECK,BST_CHECKED,0);
3590
3591
3592                bInitial=0;
3593                break;
3594            }
3595        case WM_COMMAND:
3596            {
3597                i=GetWndNum(GetParent(GetParent(hwnd)));
3598                if(i==-1) return 1;
3599                i2=GetWndInfoNum(MdiInfo[i].path);
3600                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
3601
3602                //共通スタイル
3603                if(bInitial==0){
3604                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
3605                }
3606
3607                switch(LOWORD(wParam)){
3608                    case IDC_PBS_VERTICAL:
3609                        if(HIWORD(wParam)==BN_CLICKED){
3610                            //変更情報
3611                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3612
3613                            if(SendDlgItemMessage(hwnd,IDC_PBS_VERTICAL,BM_GETCHECK,0,0))
3614                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=PBS_VERTICAL;
3615                            else
3616                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~PBS_VERTICAL;
3617                            DrawRadWindow(i,pWindowInfo);
3618                            return 1;
3619                        }
3620                        break;
3621                    case IDC_PBS_SMOOTH:
3622                        if(HIWORD(wParam)==BN_CLICKED){
3623                            //変更情報
3624                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3625
3626                            if(SendDlgItemMessage(hwnd,IDC_PBS_SMOOTH,BM_GETCHECK,0,0))
3627                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=PBS_SMOOTH;
3628                            else
3629                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~PBS_SMOOTH;
3630                            DrawRadWindow(i,pWindowInfo);
3631                            return 1;
3632                        }
3633                        break;
3634
3635                    case IDC_EXSTYLE:
3636                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
3637                        DrawRadWindow(i,pWindowInfo);
3638                        return 1;
3639                }
3640            }
3641    }
3642    return 0;
3643}
3644
3645
3646///////////////////////////
3647// RADIOBUTTON プロパティ
3648
3649BOOL CALLBACK RadProperty_RadioButtonProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
3650    extern MDIINFO MdiInfo[MAX_WNDNUM];
3651    int i,i2,i3;
3652    static BOOL bInitial;
3653
3654    switch(message){
3655        case WM_INITDIALOG:
3656            {
3657                bInitial=1;
3658                i=GetWndNum(GetParent(GetParent(hwnd)));
3659                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
3660
3661                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
3662                SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
3663
3664
3665                /////////////////////////
3666                // スタイル
3667                ////////////
3668
3669                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
3670                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
3671                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
3672                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
3673
3674                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_AUTORADIOBUTTON)==BS_AUTORADIOBUTTON) SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
3675                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0);
3676                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0);
3677                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
3678                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
3679                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
3680                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
3681
3682
3683                //////////////////
3684                // 水平方向の配置
3685                //////////////////
3686
3687                //"デフォルト"
3688                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
3689                //"左端"
3690                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
3691                //"右端"
3692                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
3693                //"中央"
3694                SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
3695
3696                //ビットを考慮してBS_CENTERを最初に比較する
3697                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
3698                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
3699                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
3700                else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
3701
3702
3703                //////////////////
3704                // 垂直方向の配置
3705                //////////////////
3706
3707                //"デフォルト"
3708                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
3709                //"上端"
3710                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
3711                //"下端"
3712                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
3713                //"中央"
3714                SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
3715
3716                //ビットを考慮してBS_VCENTERを最初に比較する
3717                if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
3718                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
3719                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
3720                else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
3721
3722
3723                bInitial=0;
3724                break;
3725            }
3726        case WM_COMMAND:
3727            {
3728                i=GetWndNum(GetParent(GetParent(hwnd)));
3729                if(i==-1) return 1;
3730                i2=GetWndInfoNum(MdiInfo[i].path);
3731                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
3732
3733                //共通スタイル
3734                if(bInitial==0){
3735                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
3736                }
3737
3738                switch(LOWORD(wParam)){
3739                    case IDC_BS_AUTO:
3740                        if(HIWORD(wParam)==BN_CLICKED){
3741                            //変更情報
3742                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3743
3744                            if(SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_GETCHECK,0,0)){
3745                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
3746                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_AUTORADIOBUTTON;
3747                            }
3748                            else{
3749                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
3750                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_RADIOBUTTON;
3751                            }
3752                            return 1;
3753                        }
3754                        break;
3755                    case IDC_BS_PUSHLIKE:
3756                        if(HIWORD(wParam)==BN_CLICKED){
3757                            //変更情報
3758                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3759
3760                            if(SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_GETCHECK,0,0))
3761                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_PUSHLIKE;
3762                            else
3763                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_PUSHLIKE;
3764                            DrawRadWindow(i,pWindowInfo);
3765                            return 1;
3766                        }
3767                        break;
3768                    case IDC_BS_LEFTTEXT:
3769                        if(HIWORD(wParam)==BN_CLICKED){
3770                            //変更情報
3771                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3772
3773                            if(SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_GETCHECK,0,0))
3774                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_LEFTTEXT;
3775                            else
3776                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_LEFTTEXT;
3777                            DrawRadWindow(i,pWindowInfo);
3778                            return 1;
3779                        }
3780                        break;
3781                    case IDC_BS_ICON:
3782                        if(HIWORD(wParam)==BN_CLICKED){
3783                            //変更情報
3784                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3785
3786                            if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
3787                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_ICON;
3788                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
3789                                SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
3790                            }
3791                            else
3792                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
3793                            DrawRadWindow(i,pWindowInfo);
3794                            return 1;
3795                        }
3796                        break;
3797                    case IDC_BS_BITMAP:
3798                        if(HIWORD(wParam)==BN_CLICKED){
3799                            //変更情報
3800                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3801
3802                            if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
3803                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BITMAP;
3804                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
3805                                SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
3806                            }
3807                            else
3808                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
3809                            DrawRadWindow(i,pWindowInfo);
3810                            return 1;
3811                        }
3812                        break;
3813                    case IDC_BS_MULTILINE:
3814                        if(HIWORD(wParam)==BN_CLICKED){
3815                            //変更情報
3816                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3817
3818                            if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
3819                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_MULTILINE;
3820                            else
3821                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_MULTILINE;
3822                            DrawRadWindow(i,pWindowInfo);
3823                            return 1;
3824                        }
3825                        break;
3826                    case IDC_BS_NOTIFY:
3827                        if(HIWORD(wParam)==BN_CLICKED){
3828                            //変更情報
3829                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3830
3831                            if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
3832                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_NOTIFY;
3833                            else
3834                                pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_NOTIFY;
3835                            return 1;
3836                        }
3837                        break;
3838
3839                    case IDC_BS_HPOS:
3840                        if(HIWORD(wParam)==CBN_SELCHANGE){
3841                            //変更情報
3842                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3843
3844                            i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
3845                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
3846                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_LEFT;
3847                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_RIGHT;
3848                            else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_CENTER;
3849                            DrawRadWindow(i,pWindowInfo);
3850                            return 1;
3851                        }
3852                        break;
3853                    case IDC_BS_VPOS:
3854                        if(HIWORD(wParam)==CBN_SELCHANGE){
3855                            //変更情報
3856                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3857
3858                            i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
3859                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
3860                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_TOP;
3861                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BOTTOM;
3862                            else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_VCENTER;
3863                            DrawRadWindow(i,pWindowInfo);
3864                            return 1;
3865                        }
3866                        break;
3867
3868                    case IDC_EXSTYLE:
3869                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
3870                        DrawRadWindow(i,pWindowInfo);
3871                        return 1;
3872                }
3873                break;
3874            }
3875    }
3876    return 0;
3877}
3878
3879
3880/////////////////////////
3881// SCROLLBAR プロパティ
3882
3883BOOL CALLBACK RadProperty_ScrollBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
3884    extern MDIINFO MdiInfo[MAX_WNDNUM];
3885    int i,i2,i3;
3886    static BOOL bInitial;
3887
3888    switch(message){
3889        case WM_INITDIALOG:
3890            {
3891                bInitial=1;
3892                i=GetWndNum(GetParent(GetParent(hwnd)));
3893                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
3894
3895                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
3896
3897
3898                ////////////////////////
3899                // スタイル
3900                ////////////
3901
3902                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
3903                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
3904                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
3905                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
3906
3907
3908                ////////
3909                // 配置
3910                ////////
3911
3912                //"指定無し"
3913                SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_FREE);
3914                //"上/左"
3915                SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_TOPORLEFT);
3916                //"下/右"
3917                SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_BOTTOMORRIGHT);
3918
3919                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SBS_TOPALIGN) SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,1,0);
3920                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SBS_BOTTOMALIGN) SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,2,0);
3921                else SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,0,0);
3922
3923
3924                bInitial=0;
3925                break;
3926            }
3927        case WM_COMMAND:
3928            {
3929                i=GetWndNum(GetParent(GetParent(hwnd)));
3930                if(i==-1) return 1;
3931                i2=GetWndInfoNum(MdiInfo[i].path);
3932                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
3933
3934                //共通スタイル
3935                if(bInitial==0){
3936                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
3937                }
3938
3939                switch(LOWORD(wParam)){
3940                    case IDC_SBS_POSITION:
3941                        if(HIWORD(wParam)==CBN_SELCHANGE){
3942                            //変更情報
3943                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
3944
3945                            i3=SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_GETCURSEL,0,0);
3946                            pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(SBS_TOPALIGN|SBS_BOTTOMALIGN);
3947                            if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SBS_TOPALIGN;
3948                            else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SBS_BOTTOMALIGN;
3949                            return 1;
3950                        }
3951                        break;
3952
3953                    case IDC_EXSTYLE:
3954                        if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
3955                        DrawRadWindow(i,pWindowInfo);
3956                        return 1;
3957                }
3958                break;
3959            }
3960    }
3961    return 0;
3962}
3963
3964
3965//////////////////////
3966// STATIC プロパティ
3967
3968BOOL CALLBACK RadProperty_StaticProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
3969    extern MDIINFO MdiInfo[MAX_WNDNUM];
3970    int i,i2,i3;
3971    static BOOL bInitial;
3972
3973    switch(message){
3974        case WM_INITDIALOG:
3975            {
3976                bInitial=1;
3977                i=GetWndNum(GetParent(GetParent(hwnd)));
3978                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
3979
3980                SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
3981                SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
3982
3983
3984                ////////////////////////
3985                // スタイル
3986                ////////////
3987
3988                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
3989                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
3990                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
3991                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
3992
3993                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SS_NOPREFIX) SendDlgItemMessage(hwnd,IDC_SS_NOPREFIX,BM_SETCHECK,BST_CHECKED,0);
3994                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SS_LEFTNOWORDWRAP) SendDlgItemMessage(hwnd,IDC_SS_LEFTNOWORDWRAP,BM_SETCHECK,BST_CHECKED,0);
3995                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SS_NOTIFY) SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
3996
3997
3998                //////////////////
3999                // テキストの配置
4000                //////////////////
4001
4002                //"左端"
4003                SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
4004                //"中央"
4005                SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
4006                //"右端"
4007                SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
4008
4009                //ビットを考慮してSS_LEFTを最後に検討する
4010                if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SS_CENTER) SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,1,0);
4011                else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SS_RIGHT) SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,2,0);
4012                else SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,0,0);
4013
4014
4015                bInitial=0;
4016                break;
4017            }
4018        case WM_COMMAND:
4019            {
4020                i=GetWndNum(GetParent(GetParent(hwnd)));
4021                if(i==-1) return 1;
4022                i2=GetWndInfoNum(MdiInfo[i].path);
4023                WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
4024
4025                //共通スタイル
4026                if(bInitial==0){
4027                    if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
4028                }
4029
4030                switch(LOWORD(wParam)){
4031                    case IDC_SS_NOPREFIX:
4032                        if(HIWORD(wParam)==BN_CLICKED){
4033                            //変更情報
4034                            Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
4035
4036                            if(SendDlgItemMessage(hwnd,IDC_SS_NOPREFIX,BM_GETCHECK,0,0))
4037                                pWindowInfo->childWindowInfos[MdiInfo[i].Md