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

Last change on this file since 475 was 475, checked in by dai_9181, 16 years ago

構成管理を変更中・・・(いったんコミット)

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