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

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

Projectクラスをリファクタリング

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