source: dev/branches/egtra/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp@ 794

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

DialogBox, CreateDialogの代替関数を実装

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