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

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

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

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