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

Last change on this file was 829, checked in by イグトランス (egtra), 12 years ago

svn:eol-styleとsvn:mime-type(文字コード指定含む)の設定

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