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