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

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

egtraブランチの内容をマージ。

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