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 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
363 | sprintf(temporary,"h%s",pWindowInfo->name);
|
---|
364 | sprintf(temp2,"%sProc",pWindowInfo->name);
|
---|
365 | if(lstrcmp(temporary,pWindowInfo->HandleName)==0&&
|
---|
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->name);
|
---|
371 | SetDlgItemText(hwnd,IDC_WINDOWHANDLE,pWindowInfo->HandleName);
|
---|
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 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
397 |
|
---|
398 | RAD_UNDOSTATE_NAME names,NoticeNames;
|
---|
399 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))+1;
|
---|
400 | names.name=(char *)HeapAlloc(hHeap,0,i3);
|
---|
401 | GetDlgItemText(hwnd,IDC_WINDOWNAME,names.name,i3);
|
---|
402 |
|
---|
403 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))+1;
|
---|
404 | names.HandleName=(char *)HeapAlloc(hHeap,0,i3);
|
---|
405 | GetDlgItemText(hwnd,IDC_WINDOWHANDLE,names.HandleName,i3);
|
---|
406 |
|
---|
407 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))+1;
|
---|
408 | names.CallBackName=(char *)HeapAlloc(hHeap,0,i3);
|
---|
409 | GetDlgItemText(hwnd,IDC_WINDOWPROC,names.CallBackName,i3);
|
---|
410 |
|
---|
411 | if(lstrcmp(names.name,pWindowInfo->name)==0&&
|
---|
412 | lstrcmp(names.HandleName,pWindowInfo->HandleName)==0&&
|
---|
413 | lstrcmp(names.CallBackName,pWindowInfo->CallBackName)==0){
|
---|
414 | HeapDefaultFree(names.name);
|
---|
415 | HeapDefaultFree(names.HandleName);
|
---|
416 | HeapDefaultFree(names.CallBackName);
|
---|
417 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
418 | return 1;
|
---|
419 | }
|
---|
420 |
|
---|
421 | //MsgBox "これらのウィンドウ識別名を変更すると、ソースコード内の識別子は手動で変換する必要があります。変更しますか?"
|
---|
422 | if(IDCANCEL==MessageBox(hwnd,STRING_WINDOW_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
|
---|
423 |
|
---|
424 | //変更情報を更新
|
---|
425 | NoticeNames.name=pWindowInfo->name;
|
---|
426 | NoticeNames.HandleName=pWindowInfo->HandleName;
|
---|
427 | NoticeNames.CallBackName=pWindowInfo->CallBackName;
|
---|
428 | Rad_NoticeChanging(i,RAD_UNDO_NAME,SELECT_WINDOW,(DWORD)&NoticeNames);
|
---|
429 |
|
---|
430 | HeapDefaultFree(pWindowInfo->name);
|
---|
431 | pWindowInfo->name=names.name;
|
---|
432 | GlobalFree(MdiInfo[i].path);
|
---|
433 | MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(names.name));
|
---|
434 | lstrcpy(MdiInfo[i].path,names.name);
|
---|
435 |
|
---|
436 | HeapDefaultFree(pWindowInfo->HandleName);
|
---|
437 | pWindowInfo->HandleName=names.HandleName;
|
---|
438 |
|
---|
439 | HeapDefaultFree(pWindowInfo->CallBackName);
|
---|
440 | pWindowInfo->CallBackName=names.CallBackName;
|
---|
441 |
|
---|
442 | EndDialog(hwnd,1);
|
---|
443 | return 1;
|
---|
444 | }
|
---|
445 | case IDCANCEL:
|
---|
446 | EndDialog(hwnd,0);
|
---|
447 | return 1;
|
---|
448 | case IDC_WINDOWNAME:
|
---|
449 | if(HIWORD(wParam)==EN_CHANGE) SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);
|
---|
450 | return 1;
|
---|
451 | case IDC_AUTOSET:
|
---|
452 | if(SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_GETCHECK,0,0)){
|
---|
453 | SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,1,0);
|
---|
454 | SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,1,0);
|
---|
455 | GetDlgItemText(hwnd,IDC_WINDOWNAME,temporary,MAX_PATH);
|
---|
456 | if(temporary[0]){
|
---|
457 | sprintf(temp2,"h%s",temporary);
|
---|
458 | SetDlgItemText(hwnd,IDC_WINDOWHANDLE,temp2);
|
---|
459 | sprintf(temp2,"%sProc",temporary);
|
---|
460 | SetDlgItemText(hwnd,IDC_WINDOWPROC,temp2);
|
---|
461 | }
|
---|
462 | else{
|
---|
463 | SetDlgItemText(hwnd,IDC_WINDOWHANDLE,"");
|
---|
464 | SetDlgItemText(hwnd,IDC_WINDOWPROC,"");
|
---|
465 | }
|
---|
466 | }
|
---|
467 | else{
|
---|
468 | SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,0,0);
|
---|
469 | SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,0,0);
|
---|
470 | }
|
---|
471 | return 1;
|
---|
472 | }
|
---|
473 | break;
|
---|
474 | }
|
---|
475 | return 0;
|
---|
476 | }
|
---|
477 | BOOL CALLBACK DlgRadProperty_Window_ExStyle(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
478 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
479 | int i;
|
---|
480 |
|
---|
481 | switch(message){
|
---|
482 | case WM_INITDIALOG:
|
---|
483 | {
|
---|
484 | SetPosCenter(hwnd);
|
---|
485 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
486 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
487 | if(pWindowInfo->ExStyle&WS_EX_TOPMOST) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_SETCHECK,BST_CHECKED,0);
|
---|
488 | if(pWindowInfo->ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
|
---|
489 | if(pWindowInfo->ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
|
---|
490 | if(pWindowInfo->ExStyle&WS_EX_TOOLWINDOW) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_SETCHECK,BST_CHECKED,0);
|
---|
491 | if(pWindowInfo->ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
492 | if(pWindowInfo->ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
493 | if(pWindowInfo->ExStyle&WS_EX_NOPARENTNOTIFY) SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
494 | if(pWindowInfo->ExStyle&WS_EX_CONTEXTHELP) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_SETCHECK,BST_CHECKED,0);
|
---|
495 | if(pWindowInfo->ExStyle&WS_EX_CONTROLPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_SETCHECK,BST_CHECKED,0);
|
---|
496 | break;
|
---|
497 | }
|
---|
498 | case WM_COMMAND:
|
---|
499 | switch(LOWORD(wParam)){
|
---|
500 | case IDOK:
|
---|
501 | {
|
---|
502 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
503 |
|
---|
504 | DWORD style;
|
---|
505 | style=0;
|
---|
506 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_GETCHECK,0,0))
|
---|
507 | style|=WS_EX_TOPMOST;
|
---|
508 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
|
---|
509 | style|=WS_EX_ACCEPTFILES;
|
---|
510 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
|
---|
511 | style|=WS_EX_TRANSPARENT;
|
---|
512 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_GETCHECK,0,0))
|
---|
513 | style|=WS_EX_TOOLWINDOW;
|
---|
514 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
|
---|
515 | style|=WS_EX_CLIENTEDGE;
|
---|
516 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
|
---|
517 | style|=WS_EX_STATICEDGE;
|
---|
518 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_GETCHECK,0,0))
|
---|
519 | style|=WS_EX_NOPARENTNOTIFY;
|
---|
520 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_GETCHECK,0,0))
|
---|
521 | style|=WS_EX_CONTEXTHELP;
|
---|
522 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_GETCHECK,0,0))
|
---|
523 | style|=WS_EX_CONTROLPARENT;
|
---|
524 |
|
---|
525 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
526 |
|
---|
527 | if(style==pWindowInfo->ExStyle){
|
---|
528 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
529 | return 1;
|
---|
530 | }
|
---|
531 |
|
---|
532 | //変更情報
|
---|
533 | Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,SELECT_WINDOW,pWindowInfo->ExStyle);
|
---|
534 |
|
---|
535 | pWindowInfo->ExStyle=style;
|
---|
536 | EndDialog(hwnd,1);
|
---|
537 | return 1;
|
---|
538 | }
|
---|
539 | case IDCANCEL:
|
---|
540 | EndDialog(hwnd,0);
|
---|
541 | return 1;
|
---|
542 | }
|
---|
543 | break;
|
---|
544 | }
|
---|
545 | return 0;
|
---|
546 | }
|
---|
547 | BOOL CALLBACK RadProperty_WindowProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
548 | extern HANDLE hHeap;
|
---|
549 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
550 | int i,i3,i4;
|
---|
551 | static BOOL bInitial;
|
---|
552 |
|
---|
553 | switch(message){
|
---|
554 | case WM_INITDIALOG:
|
---|
555 | {
|
---|
556 | bInitial=1;
|
---|
557 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
558 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
559 |
|
---|
560 | SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name);
|
---|
561 | SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->HandleName);
|
---|
562 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
|
---|
563 |
|
---|
564 | //"3D FACE(標準)"
|
---|
565 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR1);
|
---|
566 | //"色指定"
|
---|
567 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR2);
|
---|
568 |
|
---|
569 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++)
|
---|
570 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
571 | if(pWindowInfo->type==WNDTYPE_MODALDLG||
|
---|
572 | pWindowInfo->type==WNDTYPE_MODELESSDLG){
|
---|
573 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
|
---|
574 | EnableWindow(GetDlgItem(hwnd,IDC_BGCOLOR),0);
|
---|
575 | }
|
---|
576 | else{
|
---|
577 | if(pWindowInfo->bgColor==COLOR_3DFACE){
|
---|
578 | //3DFACE
|
---|
579 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
|
---|
580 | }
|
---|
581 | else if(pWindowInfo->bgColor<=0){
|
---|
582 | //色指定
|
---|
583 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0);
|
---|
584 | }
|
---|
585 | else if(pWindowInfo->bgColor>=0x1000){
|
---|
586 | //ビットマップ指定
|
---|
587 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+pWindowInfo->bgColor-0x1000,0);
|
---|
588 | }
|
---|
589 | }
|
---|
590 |
|
---|
591 |
|
---|
592 | ////////////
|
---|
593 | // メニュー
|
---|
594 | ////////////
|
---|
595 |
|
---|
596 | //"なし"
|
---|
597 | SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)STRING_NONE_);
|
---|
598 |
|
---|
599 | for(i3=0,i4=0;i3<ProjectInfo.NumberOfMenu;i3++){
|
---|
600 | if(pWindowInfo->MenuID){
|
---|
601 | if(lstrcmpi(ProjectInfo.pMenuInfo[i3].IdName,pWindowInfo->MenuID)==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->MenuID){
|
---|
607 | //メニューが存在しない場合、無効にする
|
---|
608 | HeapDefaultFree(pWindowInfo->MenuID);
|
---|
609 | pWindowInfo->MenuID=0;
|
---|
610 | DrawRadWindow(i,pWindowInfo);
|
---|
611 | }
|
---|
612 | SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_SETCURSEL,i4,0);
|
---|
613 |
|
---|
614 |
|
---|
615 | ////////////
|
---|
616 | // アイコン
|
---|
617 | ////////////
|
---|
618 |
|
---|
619 | //"Windowsロゴ(標準)"
|
---|
620 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_ICONDEFAULT);
|
---|
621 |
|
---|
622 | for(i3=0,i4=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){
|
---|
623 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
624 |
|
---|
625 | if(lstrcmp(pWindowInfo->IconResName,ProjectInfo.res.pIconResInfo[i3].IdName)==0)
|
---|
626 | i4=i3+1;
|
---|
627 | }
|
---|
628 | if(i4==0&&pWindowInfo->IconResName){
|
---|
629 | //アイコンが存在しない場合、無効にする
|
---|
630 | HeapDefaultFree(pWindowInfo->IconResName);
|
---|
631 | pWindowInfo->IconResName=0;
|
---|
632 | DrawRadWindow(i,pWindowInfo);
|
---|
633 | }
|
---|
634 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_SETCURSEL,i4,0);
|
---|
635 |
|
---|
636 |
|
---|
637 | ////////////
|
---|
638 | // スタイル
|
---|
639 | ////////////
|
---|
640 |
|
---|
641 | //"オーバーラップ"
|
---|
642 | SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_OVERLAPPED);
|
---|
643 | //"ポップアップ"
|
---|
644 | SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_POPUP);
|
---|
645 | //"チャイルド"
|
---|
646 | SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_CHILD);
|
---|
647 |
|
---|
648 | if(pWindowInfo->style&WS_POPUP) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,1,0);
|
---|
649 | else if(pWindowInfo->style&WS_CHILD) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,2,0);
|
---|
650 | else SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,0,0);
|
---|
651 |
|
---|
652 | //"枠なし"
|
---|
653 | SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_NONE);
|
---|
654 | //"細枠"
|
---|
655 | SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_THICK);
|
---|
656 | //"サイズ変更枠"
|
---|
657 | SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_BORDER);
|
---|
658 |
|
---|
659 | //WS_CAPTION(WS_BORDER含む)を考慮してWS_THICKFRAMEを最初に比較する
|
---|
660 | if(pWindowInfo->style&WS_THICKFRAME) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,2,0);
|
---|
661 | else if(pWindowInfo->style&WS_BORDER) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,1,0);
|
---|
662 | else SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,0,0);
|
---|
663 |
|
---|
664 | if(pWindowInfo->style&WS_CAPTION) SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
|
---|
665 | if(pWindowInfo->style&WS_SYSMENU) SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_SETCHECK,BST_CHECKED,0);
|
---|
666 | if(pWindowInfo->style&WS_MINIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
|
---|
667 | if(pWindowInfo->style&WS_MAXIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
|
---|
668 | if(pWindowInfo->style&WS_MINIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_SETCHECK,BST_CHECKED,0);
|
---|
669 | if(pWindowInfo->style&WS_MAXIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_SETCHECK,BST_CHECKED,0);
|
---|
670 | if(pWindowInfo->style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
|
---|
671 | if(pWindowInfo->style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
|
---|
672 | if(pWindowInfo->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
673 | if(pWindowInfo->style&WS_CLIPSIBLINGS) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_SETCHECK,BST_CHECKED,0);
|
---|
674 | if(pWindowInfo->style&WS_CLIPCHILDREN) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_SETCHECK,BST_CHECKED,0);
|
---|
675 | if(pWindowInfo->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
676 |
|
---|
677 | SetDlgItemText(hwnd,IDC_SETFONT,pWindowInfo->LogFont.lfFaceName);
|
---|
678 |
|
---|
679 | RadProperty_Window_Window_StylingOrder(hwnd,&pWindowInfo->style);
|
---|
680 |
|
---|
681 |
|
---|
682 | //////////
|
---|
683 | //タイプ
|
---|
684 | switch(pWindowInfo->type){
|
---|
685 | case WNDTYPE_DEFAULT:
|
---|
686 | SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_SETCHECK,BST_CHECKED,0);
|
---|
687 | break;
|
---|
688 | case WNDTYPE_MODALDLG:
|
---|
689 | SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_SETCHECK,BST_CHECKED,0);
|
---|
690 | break;
|
---|
691 | case WNDTYPE_MODELESSDLG:
|
---|
692 | SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_SETCHECK,BST_CHECKED,0);
|
---|
693 | break;
|
---|
694 | }
|
---|
695 |
|
---|
696 |
|
---|
697 | bInitial=0;
|
---|
698 | break;
|
---|
699 | }
|
---|
700 | case WM_COMMAND:
|
---|
701 | switch(LOWORD(wParam)){
|
---|
702 | case IDC_RENAMEWINDOW:
|
---|
703 | {
|
---|
704 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_RENAME),hwnd,(DLGPROC)DlgRadProperty_Window_Rename)) return 1;
|
---|
705 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
706 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
707 | SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name);
|
---|
708 | SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->HandleName);
|
---|
709 | return 1;
|
---|
710 | }
|
---|
711 | case IDC_RENAMECAPTION:
|
---|
712 | {
|
---|
713 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1;
|
---|
714 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
715 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
716 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
|
---|
717 | return 1;
|
---|
718 | }
|
---|
719 | case IDC_SETFONT:
|
---|
720 | {
|
---|
721 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
722 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
723 | LOGFONT lf;
|
---|
724 | lf=pWindowInfo->LogFont;
|
---|
725 | if(!SetFontDialog(hwnd,&pWindowInfo->LogFont,0)) return 1;
|
---|
726 |
|
---|
727 | //変更情報
|
---|
728 | Rad_NoticeChanging(i,RAD_UNDO_FONT,SELECT_WINDOW,(DWORD)&lf);
|
---|
729 |
|
---|
730 | SetDlgItemText(hwnd,IDC_SETFONT,pWindowInfo->LogFont.lfFaceName);
|
---|
731 | DrawRadWindow(i,pWindowInfo);
|
---|
732 | return 1;
|
---|
733 | }
|
---|
734 | case IDC_BGCOLOR:
|
---|
735 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
736 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
737 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
738 |
|
---|
739 | i3=SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_GETCURSEL,0,0);
|
---|
740 | if(i3==0){
|
---|
741 | //3DFACE
|
---|
742 |
|
---|
743 | //変更情報
|
---|
744 | Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
|
---|
745 |
|
---|
746 | pWindowInfo->bgColor=COLOR_3DFACE;
|
---|
747 | }
|
---|
748 | else if(i3==1){
|
---|
749 | //色指定
|
---|
750 | CHOOSECOLOR cc;
|
---|
751 | COLORREF CusColors[16]={
|
---|
752 | RGB(255,255,255),
|
---|
753 | RGB(0,0,0),
|
---|
754 | RGB(128,128,128),
|
---|
755 | RGB(192,192,192),
|
---|
756 | RGB(128,0,0),
|
---|
757 | RGB(255,0,0),
|
---|
758 | RGB(128,128,0),
|
---|
759 | RGB(255,255,0),
|
---|
760 | RGB(0,128,0),
|
---|
761 | RGB(0,255,0),
|
---|
762 | RGB(0,128,128),
|
---|
763 | RGB(0,255,255),
|
---|
764 | RGB(0,0,128),
|
---|
765 | RGB(0,0,255),
|
---|
766 | RGB(128,0,128),
|
---|
767 | RGB(255,0,255)};
|
---|
768 | cc.lStructSize=sizeof(CHOOSECOLOR);
|
---|
769 | cc.hwndOwner=hwnd;
|
---|
770 | if(pWindowInfo->bgColor<=0)
|
---|
771 | cc.rgbResult=-pWindowInfo->bgColor;
|
---|
772 | else cc.rgbResult=RGB(255,255,255);
|
---|
773 | cc.lpCustColors=CusColors;
|
---|
774 | cc.Flags=CC_RGBINIT|CC_FULLOPEN;
|
---|
775 | if(!ChooseColor(&cc)){
|
---|
776 | //キャンセル動作
|
---|
777 | if(pWindowInfo->bgColor==COLOR_3DFACE){
|
---|
778 | //3DFACE
|
---|
779 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
|
---|
780 | }
|
---|
781 | else if(pWindowInfo->bgColor<=0){
|
---|
782 | //色指定
|
---|
783 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0);
|
---|
784 | }
|
---|
785 | else if(pWindowInfo->bgColor>=0x1000){
|
---|
786 | //ビットマップ指定
|
---|
787 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+pWindowInfo->bgColor-0x1000,0);
|
---|
788 | }
|
---|
789 | return 1;
|
---|
790 | }
|
---|
791 |
|
---|
792 | //変更情報
|
---|
793 | Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
|
---|
794 |
|
---|
795 | pWindowInfo->bgColor=-(int)cc.rgbResult;
|
---|
796 | }
|
---|
797 | else{
|
---|
798 | //ビットマップ
|
---|
799 | i3-=2;
|
---|
800 |
|
---|
801 | //変更情報
|
---|
802 | Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
|
---|
803 |
|
---|
804 | pWindowInfo->bgColor=0x1000+i3;
|
---|
805 | }
|
---|
806 | DrawRadWindow(i,pWindowInfo);
|
---|
807 | return 1;
|
---|
808 | }
|
---|
809 | break;
|
---|
810 | case IDC_WINDOWMENU:
|
---|
811 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
812 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
813 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
814 |
|
---|
815 | //変更情報
|
---|
816 | Rad_NoticeChanging(i,RAD_UNDO_WINDOWMENU,SELECT_WINDOW,(long)pWindowInfo->MenuID);
|
---|
817 |
|
---|
818 | i3=SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETCURSEL,0,0);
|
---|
819 | if(pWindowInfo->MenuID)
|
---|
820 | HeapDefaultFree(pWindowInfo->MenuID);
|
---|
821 | if(i3==0) pWindowInfo->MenuID=0;
|
---|
822 | else{
|
---|
823 | pWindowInfo->MenuID=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXTLEN,i3,0)+1);
|
---|
824 | SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXT,i3,(long)pWindowInfo->MenuID);
|
---|
825 | }
|
---|
826 | DrawRadWindow(i,pWindowInfo);
|
---|
827 | return 1;
|
---|
828 | }
|
---|
829 | break;
|
---|
830 | case IDC_ICONRES:
|
---|
831 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
832 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
833 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
834 |
|
---|
835 | //変更情報
|
---|
836 | Rad_NoticeChanging(i,RAD_UNDO_ICONRES,SELECT_WINDOW,(long)pWindowInfo->IconResName);
|
---|
837 |
|
---|
838 | i3=SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETCURSEL,0,0);
|
---|
839 | if(pWindowInfo->IconResName)
|
---|
840 | HeapDefaultFree(pWindowInfo->IconResName);
|
---|
841 | if(i3==0) pWindowInfo->IconResName=0;
|
---|
842 | else{
|
---|
843 | pWindowInfo->IconResName=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXTLEN,i3,0)+1);
|
---|
844 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXT,i3,(long)pWindowInfo->IconResName);
|
---|
845 | }
|
---|
846 | DrawRadWindow(i,pWindowInfo);
|
---|
847 | return 1;
|
---|
848 | }
|
---|
849 | break;
|
---|
850 |
|
---|
851 | case IDC_WINDOWSTYLE:
|
---|
852 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
853 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
854 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
855 |
|
---|
856 | //変更情報
|
---|
857 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
858 |
|
---|
859 | i3=SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_GETCURSEL,0,0);
|
---|
860 | pWindowInfo->style&=0x3FFFFFFF;
|
---|
861 | if(i3==1) pWindowInfo->style|=WS_POPUP;
|
---|
862 | else if(i3==2) pWindowInfo->style|=WS_CHILD;
|
---|
863 | RadProperty_Window_Window_StylingOrder(hwnd,&pWindowInfo->style);
|
---|
864 | DrawRadWindow(i,pWindowInfo);
|
---|
865 | return 1;
|
---|
866 | }
|
---|
867 | break;
|
---|
868 | case IDC_BORDERSTYLE:
|
---|
869 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
870 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
871 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
872 |
|
---|
873 | //変更情報
|
---|
874 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
875 |
|
---|
876 | i3=SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_GETCURSEL,0,0);
|
---|
877 | pWindowInfo->style&=~(WS_BORDER|WS_THICKFRAME);
|
---|
878 | if(i3==1) pWindowInfo->style|=WS_BORDER;
|
---|
879 | else if(i3==2){
|
---|
880 | pWindowInfo->style|=WS_BORDER;
|
---|
881 | pWindowInfo->style|=WS_THICKFRAME;
|
---|
882 | }
|
---|
883 | RadProperty_Window_Border_StylingOrder(hwnd,&pWindowInfo->style);
|
---|
884 | DrawRadWindow(i,pWindowInfo);
|
---|
885 | return 1;
|
---|
886 | }
|
---|
887 | break;
|
---|
888 |
|
---|
889 | case IDC_STYLE_CAPTION:
|
---|
890 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
891 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
892 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
893 |
|
---|
894 | //変更情報
|
---|
895 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
896 |
|
---|
897 | if(SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_GETCHECK,0,0))
|
---|
898 | pWindowInfo->style|=WS_CAPTION;
|
---|
899 | else
|
---|
900 | pWindowInfo->style&=~WS_CAPTION;
|
---|
901 | RadProperty_Window_Caption_StylingOrder(hwnd,&pWindowInfo->style);
|
---|
902 | DrawRadWindow(i,pWindowInfo);
|
---|
903 | return 1;
|
---|
904 | }
|
---|
905 | break;
|
---|
906 | case IDC_STYLE_SYSMENU:
|
---|
907 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
908 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
909 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
910 |
|
---|
911 | //変更情報
|
---|
912 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
913 |
|
---|
914 | if(SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_GETCHECK,0,0))
|
---|
915 | pWindowInfo->style|=WS_SYSMENU;
|
---|
916 | else
|
---|
917 | pWindowInfo->style&=~WS_SYSMENU;
|
---|
918 | DrawRadWindow(i,pWindowInfo);
|
---|
919 | return 1;
|
---|
920 | }
|
---|
921 | break;
|
---|
922 | case IDC_STYLE_MINIMIZEBOX:
|
---|
923 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
924 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
925 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
926 |
|
---|
927 | //変更情報
|
---|
928 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
929 |
|
---|
930 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_GETCHECK,0,0))
|
---|
931 | pWindowInfo->style|=WS_MINIMIZEBOX;
|
---|
932 | else
|
---|
933 | pWindowInfo->style&=~WS_MINIMIZEBOX;
|
---|
934 | DrawRadWindow(i,pWindowInfo);
|
---|
935 | return 1;
|
---|
936 | }
|
---|
937 | break;
|
---|
938 | case IDC_STYLE_MAXIMIZEBOX:
|
---|
939 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
940 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
941 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
942 |
|
---|
943 | //変更情報
|
---|
944 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
945 |
|
---|
946 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_GETCHECK,0,0))
|
---|
947 | pWindowInfo->style|=WS_MAXIMIZEBOX;
|
---|
948 | else
|
---|
949 | pWindowInfo->style&=~WS_MAXIMIZEBOX;
|
---|
950 | DrawRadWindow(i,pWindowInfo);
|
---|
951 | return 1;
|
---|
952 | }
|
---|
953 | break;
|
---|
954 | case IDC_STYLE_MINIMIZE:
|
---|
955 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
956 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
957 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
958 |
|
---|
959 | //変更情報
|
---|
960 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
961 |
|
---|
962 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_GETCHECK,0,0))
|
---|
963 | pWindowInfo->style|=WS_MINIMIZE;
|
---|
964 | else
|
---|
965 | pWindowInfo->style&=~WS_MINIMIZE;
|
---|
966 | DrawRadWindow(i,pWindowInfo);
|
---|
967 | return 1;
|
---|
968 | }
|
---|
969 | break;
|
---|
970 | case IDC_STYLE_MAXIMIZE:
|
---|
971 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
972 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
973 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
974 |
|
---|
975 | //変更情報
|
---|
976 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
977 |
|
---|
978 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_GETCHECK,0,0))
|
---|
979 | pWindowInfo->style|=WS_MAXIMIZE;
|
---|
980 | else
|
---|
981 | pWindowInfo->style&=~WS_MAXIMIZE;
|
---|
982 | DrawRadWindow(i,pWindowInfo);
|
---|
983 | return 1;
|
---|
984 | }
|
---|
985 | case IDC_STYLE_HSCROLLBAR:
|
---|
986 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
987 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
988 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
989 |
|
---|
990 | //変更情報
|
---|
991 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
992 |
|
---|
993 | if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_GETCHECK,0,0))
|
---|
994 | pWindowInfo->style|=WS_HSCROLL;
|
---|
995 | else
|
---|
996 | pWindowInfo->style&=~WS_HSCROLL;
|
---|
997 | DrawRadWindow(i,pWindowInfo);
|
---|
998 | return 1;
|
---|
999 | }
|
---|
1000 | case IDC_STYLE_VSCROLLBAR:
|
---|
1001 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1002 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1003 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1004 |
|
---|
1005 | //変更情報
|
---|
1006 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
1007 |
|
---|
1008 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_GETCHECK,0,0))
|
---|
1009 | pWindowInfo->style|=WS_VSCROLL;
|
---|
1010 | else
|
---|
1011 | pWindowInfo->style&=~WS_VSCROLL;
|
---|
1012 | DrawRadWindow(i,pWindowInfo);
|
---|
1013 | return 1;
|
---|
1014 | }
|
---|
1015 | break;
|
---|
1016 | case IDC_STYLE_DISABLED:
|
---|
1017 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1018 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1019 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1020 |
|
---|
1021 | //変更情報
|
---|
1022 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
1023 |
|
---|
1024 | if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0))
|
---|
1025 | pWindowInfo->style|=WS_DISABLED;
|
---|
1026 | else
|
---|
1027 | pWindowInfo->style&=~WS_DISABLED;
|
---|
1028 | DrawRadWindow(i,pWindowInfo);
|
---|
1029 | return 1;
|
---|
1030 | }
|
---|
1031 | break;
|
---|
1032 | case IDC_STYLE_CLIPSIBLINGS:
|
---|
1033 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1034 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1035 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1036 |
|
---|
1037 | //変更情報
|
---|
1038 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
1039 |
|
---|
1040 | if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_GETCHECK,0,0))
|
---|
1041 | pWindowInfo->style|=WS_CLIPSIBLINGS;
|
---|
1042 | else
|
---|
1043 | pWindowInfo->style&=~WS_CLIPSIBLINGS;
|
---|
1044 | DrawRadWindow(i,pWindowInfo);
|
---|
1045 | return 1;
|
---|
1046 | }
|
---|
1047 | break;
|
---|
1048 | case IDC_STYLE_CLIPCHILDREN:
|
---|
1049 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1050 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1051 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1052 |
|
---|
1053 | //変更情報
|
---|
1054 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
1055 |
|
---|
1056 | if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_GETCHECK,0,0))
|
---|
1057 | pWindowInfo->style|=WS_CLIPCHILDREN;
|
---|
1058 | else
|
---|
1059 | pWindowInfo->style&=~WS_CLIPCHILDREN;
|
---|
1060 | DrawRadWindow(i,pWindowInfo);
|
---|
1061 | return 1;
|
---|
1062 | }
|
---|
1063 | break;
|
---|
1064 | case IDC_STYLE_VISIBLE:
|
---|
1065 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1066 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1067 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1068 |
|
---|
1069 | //変更情報
|
---|
1070 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
1071 |
|
---|
1072 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0))
|
---|
1073 | pWindowInfo->style|=WS_VISIBLE;
|
---|
1074 | else
|
---|
1075 | pWindowInfo->style&=~WS_VISIBLE;
|
---|
1076 | DrawRadWindow(i,pWindowInfo);
|
---|
1077 | return 1;
|
---|
1078 | }
|
---|
1079 | break;
|
---|
1080 |
|
---|
1081 | case IDC_EXSTYLE:
|
---|
1082 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Window_ExStyle)) return 1;
|
---|
1083 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1084 | DrawRadWindow(i,GetWndInfo(MdiInfo[i].path));
|
---|
1085 | return 1;
|
---|
1086 |
|
---|
1087 | case IDC_DEFWINDOW:
|
---|
1088 | case IDC_MODALDLG:
|
---|
1089 | case IDC_MODELESSDLG:
|
---|
1090 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1091 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1092 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1093 |
|
---|
1094 | //変更情報
|
---|
1095 | Rad_NoticeChanging(i,RAD_UNDO_TYPE,SELECT_WINDOW,pWindowInfo->type);
|
---|
1096 |
|
---|
1097 | if(SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_GETCHECK,0,0))
|
---|
1098 | pWindowInfo->type=WNDTYPE_DEFAULT;
|
---|
1099 | else if(SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_GETCHECK,0,0))
|
---|
1100 | pWindowInfo->type=WNDTYPE_MODALDLG;
|
---|
1101 | else if(SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_GETCHECK,0,0))
|
---|
1102 | pWindowInfo->type=WNDTYPE_MODELESSDLG;
|
---|
1103 | return 1;
|
---|
1104 | }
|
---|
1105 | break;
|
---|
1106 | }
|
---|
1107 | break;
|
---|
1108 | }
|
---|
1109 | return 0;
|
---|
1110 | }
|
---|
1111 |
|
---|
1112 | BOOL CALLBACK DlgRadProperty_Item_RenameCaption(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
1113 | extern HANDLE hHeap;
|
---|
1114 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
1115 | int i,i3;
|
---|
1116 | char *temporary;
|
---|
1117 | POINTANDSIZE PointAndSize;
|
---|
1118 |
|
---|
1119 | switch(message){
|
---|
1120 | case WM_INITDIALOG:
|
---|
1121 | {
|
---|
1122 | SetPosCenter(hwnd);
|
---|
1123 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
1124 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1125 | if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
|
---|
1126 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
|
---|
1127 | else
|
---|
1128 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
|
---|
1129 | break;
|
---|
1130 | }
|
---|
1131 | case WM_COMMAND:
|
---|
1132 | switch(LOWORD(wParam)){
|
---|
1133 | case IDOK:
|
---|
1134 | {
|
---|
1135 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
1136 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1137 |
|
---|
1138 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_CAPTION))+1;
|
---|
1139 | temporary=(char *)HeapAlloc(hHeap,0,i3);
|
---|
1140 | GetDlgItemText(hwnd,IDC_CAPTION,temporary,i3);
|
---|
1141 | if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
|
---|
1142 | if(lstrcmp(temporary,pWindowInfo->caption)==0){
|
---|
1143 | HeapDefaultFree(temporary);
|
---|
1144 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
1145 | return 1;
|
---|
1146 | }
|
---|
1147 |
|
---|
1148 | //変更情報を更新
|
---|
1149 | Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->caption);
|
---|
1150 |
|
---|
1151 | HeapDefaultFree(pWindowInfo->caption);
|
---|
1152 | pWindowInfo->caption=temporary;
|
---|
1153 | }
|
---|
1154 | else{
|
---|
1155 | if(lstrcmp(temporary,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption)==0){
|
---|
1156 | HeapDefaultFree(temporary);
|
---|
1157 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
1158 | return 1;
|
---|
1159 | }
|
---|
1160 |
|
---|
1161 | //変更情報を更新
|
---|
1162 | Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
|
---|
1163 |
|
---|
1164 | HeapDefaultFree(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
|
---|
1165 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption=temporary;
|
---|
1166 |
|
---|
1167 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_STATIC){
|
---|
1168 | //スタティック テキスト
|
---|
1169 | //テキストが表示できるようにサイズを拡大する
|
---|
1170 |
|
---|
1171 | PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->pos;
|
---|
1172 | PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size;
|
---|
1173 | Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
|
---|
1174 |
|
---|
1175 | HFONT hFont,hOldFont;
|
---|
1176 | hFont=CreateFontIndirect(&pWindowInfo->LogFont);
|
---|
1177 | hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
|
---|
1178 | GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
|
---|
1179 | SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
|
---|
1180 | DeleteObject(hFont);
|
---|
1181 |
|
---|
1182 | //テキストの終端に余裕を持たせる
|
---|
1183 | PointAndSize.size.cx+=5;
|
---|
1184 |
|
---|
1185 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cx<PointAndSize.size.cx)
|
---|
1186 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cx=PointAndSize.size.cx;
|
---|
1187 | }
|
---|
1188 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_CHECKBOX){
|
---|
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+=21;
|
---|
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_RADIOBUTTON){
|
---|
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+=20;
|
---|
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 | }
|
---|
1231 | DrawRadWindow(i,pWindowInfo);
|
---|
1232 | EndDialog(hwnd,1);
|
---|
1233 | return 1;
|
---|
1234 | }
|
---|
1235 | case IDCANCEL:
|
---|
1236 | EndDialog(hwnd,0);
|
---|
1237 | return 1;
|
---|
1238 | }
|
---|
1239 | break;
|
---|
1240 | }
|
---|
1241 | return 0;
|
---|
1242 | }
|
---|
1243 | BOOL CALLBACK DlgRadProperty_Item_RenameID(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
1244 | extern HANDLE hHeap;
|
---|
1245 | extern HWND hClient,hOwner;
|
---|
1246 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
1247 | int i,i3;
|
---|
1248 | char *temporary;
|
---|
1249 |
|
---|
1250 | switch(message){
|
---|
1251 | case WM_INITDIALOG:
|
---|
1252 | {
|
---|
1253 | SetPosCenter(hwnd);
|
---|
1254 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
1255 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1256 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
|
---|
1257 | }
|
---|
1258 | break;
|
---|
1259 | case WM_COMMAND:
|
---|
1260 | switch(LOWORD(wParam)){
|
---|
1261 | case IDOK:
|
---|
1262 | {
|
---|
1263 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
1264 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1265 |
|
---|
1266 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_IDNAME))+1;
|
---|
1267 | if(i3==1){
|
---|
1268 | //MsgBox "ID名を入力して下さい。"
|
---|
1269 | MessageBox(hOwner,STRING_ITEM_RENAME_MUST_ID,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
|
---|
1270 | break;
|
---|
1271 | }
|
---|
1272 | temporary=(char *)HeapAlloc(hHeap,0,i3);
|
---|
1273 | GetDlgItemText(hwnd,IDC_IDNAME,temporary,i3);
|
---|
1274 | if(lstrcmp(temporary,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName)==0){
|
---|
1275 | HeapDefaultFree(temporary);
|
---|
1276 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
1277 | return 1;
|
---|
1278 | }
|
---|
1279 |
|
---|
1280 | //MsgBox "アイテムのID名を変更すると、ソースコード内のID名は手動で変換する必要があります。変更しますか?"
|
---|
1281 | if(IDCANCEL==MessageBox(hwnd,STRING_ITEM_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
|
---|
1282 |
|
---|
1283 | //変更情報を更新
|
---|
1284 | Rad_NoticeChanging(i,RAD_UNDO_NAME,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
|
---|
1285 |
|
---|
1286 | HeapDefaultFree(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
|
---|
1287 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName=temporary;
|
---|
1288 |
|
---|
1289 | EndDialog(hwnd,1);
|
---|
1290 | return 1;
|
---|
1291 | }
|
---|
1292 | case IDCANCEL:
|
---|
1293 | EndDialog(hwnd,0);
|
---|
1294 | return 1;
|
---|
1295 | }
|
---|
1296 | break;
|
---|
1297 | }
|
---|
1298 | return 0;
|
---|
1299 | }
|
---|
1300 | BOOL DefaultItemStyles(HWND hwnd,int WndNum,int WndInfoNum,WPARAM wParam){
|
---|
1301 | extern HANDLE hHeap;
|
---|
1302 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
1303 |
|
---|
1304 | WindowInfo *pWindowInfo = ProjectInfo.windowInfos[WndInfoNum];
|
---|
1305 |
|
---|
1306 | switch(LOWORD(wParam)){
|
---|
1307 | case IDC_RENAMEID:
|
---|
1308 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMEID),hwnd,(DLGPROC)DlgRadProperty_Item_RenameID)) return 1;
|
---|
1309 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->IdName);
|
---|
1310 | return 1;
|
---|
1311 | case IDC_RENAMECAPTION:
|
---|
1312 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1;
|
---|
1313 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->caption);
|
---|
1314 | return 1;
|
---|
1315 | case IDC_STYLE_DISABLED:
|
---|
1316 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1317 | //変更情報
|
---|
1318 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1319 |
|
---|
1320 | if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0))
|
---|
1321 | pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style|=WS_DISABLED;
|
---|
1322 | else
|
---|
1323 | pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style&=~WS_DISABLED;
|
---|
1324 | DrawRadWindow(WndNum,pWindowInfo);
|
---|
1325 | return 1;
|
---|
1326 | }
|
---|
1327 | break;
|
---|
1328 | case IDC_STYLE_VISIBLE:
|
---|
1329 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1330 | //変更情報
|
---|
1331 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1332 |
|
---|
1333 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0))
|
---|
1334 | pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style|=WS_VISIBLE;
|
---|
1335 | else
|
---|
1336 | pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style&=~WS_VISIBLE;
|
---|
1337 | return 1;
|
---|
1338 | }
|
---|
1339 | break;
|
---|
1340 | case IDC_STYLE_GROUP:
|
---|
1341 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1342 | //変更情報
|
---|
1343 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1344 |
|
---|
1345 | if(SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_GETCHECK,0,0))
|
---|
1346 | pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style|=WS_GROUP;
|
---|
1347 | else
|
---|
1348 | pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style&=~WS_GROUP;
|
---|
1349 | return 1;
|
---|
1350 | }
|
---|
1351 | break;
|
---|
1352 | case IDC_STYLE_TABSTOP:
|
---|
1353 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1354 | //変更情報
|
---|
1355 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1356 |
|
---|
1357 | if(SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_GETCHECK,0,0))
|
---|
1358 | pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style|=WS_TABSTOP;
|
---|
1359 | else
|
---|
1360 | pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->style&=~WS_TABSTOP;
|
---|
1361 | return 1;
|
---|
1362 | }
|
---|
1363 | break;
|
---|
1364 | }
|
---|
1365 | return 0;
|
---|
1366 | }
|
---|
1367 | BOOL CALLBACK DlgRadProperty_Item_ExStyle(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
1368 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
1369 | int i;
|
---|
1370 |
|
---|
1371 | switch(message){
|
---|
1372 | case WM_INITDIALOG:
|
---|
1373 | {
|
---|
1374 | SetPosCenter(hwnd);
|
---|
1375 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
1376 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1377 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
|
---|
1378 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
|
---|
1379 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle&WS_EX_DLGMODALFRAME) SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_SETCHECK,BST_CHECKED,0);
|
---|
1380 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
1381 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
1382 | break;
|
---|
1383 | }
|
---|
1384 | case WM_COMMAND:
|
---|
1385 | switch(LOWORD(wParam)){
|
---|
1386 | case IDOK:
|
---|
1387 | {
|
---|
1388 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
1389 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1390 |
|
---|
1391 | DWORD style;
|
---|
1392 | style=0;
|
---|
1393 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
|
---|
1394 | style|=WS_EX_ACCEPTFILES;
|
---|
1395 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
|
---|
1396 | style|=WS_EX_TRANSPARENT;
|
---|
1397 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_GETCHECK,0,0))
|
---|
1398 | style|=WS_EX_DLGMODALFRAME;
|
---|
1399 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
|
---|
1400 | style|=WS_EX_CLIENTEDGE;
|
---|
1401 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
|
---|
1402 | style|=WS_EX_STATICEDGE;
|
---|
1403 |
|
---|
1404 | if(style==pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle){
|
---|
1405 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
1406 | return 1;
|
---|
1407 | }
|
---|
1408 |
|
---|
1409 | //変更情報
|
---|
1410 | Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle);
|
---|
1411 |
|
---|
1412 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ExStyle=style;
|
---|
1413 | EndDialog(hwnd,1);
|
---|
1414 | return 1;
|
---|
1415 | }
|
---|
1416 | case IDCANCEL:
|
---|
1417 | EndDialog(hwnd,0);
|
---|
1418 | return 1;
|
---|
1419 | }
|
---|
1420 | break;
|
---|
1421 | }
|
---|
1422 | return 0;
|
---|
1423 | }
|
---|
1424 |
|
---|
1425 |
|
---|
1426 | /////////////////////
|
---|
1427 | // BUTTON プロパティ
|
---|
1428 |
|
---|
1429 | BOOL CALLBACK RadProperty_ButtonProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
1430 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
1431 | int i,i2,i3;
|
---|
1432 | static BOOL bInitial;
|
---|
1433 |
|
---|
1434 | switch(message){
|
---|
1435 | case WM_INITDIALOG:
|
---|
1436 | {
|
---|
1437 | bInitial=1;
|
---|
1438 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1439 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1440 |
|
---|
1441 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
|
---|
1442 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
|
---|
1443 |
|
---|
1444 |
|
---|
1445 | ////////////
|
---|
1446 | //スタイル
|
---|
1447 |
|
---|
1448 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
1449 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
1450 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
1451 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
1452 |
|
---|
1453 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_OWNERDRAW)==BS_OWNERDRAW) SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_CHECKED,0);
|
---|
1454 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_DEFPUSHBUTTON) SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_CHECKED,0);
|
---|
1455 |
|
---|
1456 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
|
---|
1457 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
1458 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
|
---|
1459 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
1460 |
|
---|
1461 |
|
---|
1462 | //////////////////
|
---|
1463 | // 水平方向の配置
|
---|
1464 | //////////////////
|
---|
1465 |
|
---|
1466 | //"デフォルト"
|
---|
1467 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
1468 | //"左端"
|
---|
1469 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
1470 | //"右端"
|
---|
1471 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
1472 | //"中央"
|
---|
1473 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
1474 |
|
---|
1475 | //ビットを考慮してBS_CENTERを最初に比較する
|
---|
1476 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
|
---|
1477 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
|
---|
1478 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
|
---|
1479 | else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
|
---|
1480 |
|
---|
1481 |
|
---|
1482 | //////////////////
|
---|
1483 | // 垂直方向の配置
|
---|
1484 | //////////////////
|
---|
1485 |
|
---|
1486 | //"デフォルト"
|
---|
1487 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
1488 | //"上端"
|
---|
1489 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
|
---|
1490 | //"下端"
|
---|
1491 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
|
---|
1492 | //"中央"
|
---|
1493 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
1494 |
|
---|
1495 | //ビットを考慮してBS_VCENTERを最初に比較する
|
---|
1496 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
|
---|
1497 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
|
---|
1498 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
|
---|
1499 | else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
|
---|
1500 |
|
---|
1501 |
|
---|
1502 | bInitial=0;
|
---|
1503 | break;
|
---|
1504 | }
|
---|
1505 | case WM_COMMAND:
|
---|
1506 | {
|
---|
1507 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1508 | if(i==-1) return 1;
|
---|
1509 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
1510 | WindowInfo *pWindowInfo = ProjectInfo.windowInfos[i2];
|
---|
1511 |
|
---|
1512 | //共通スタイル
|
---|
1513 | if(bInitial==0){
|
---|
1514 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
1515 | }
|
---|
1516 |
|
---|
1517 | switch(LOWORD(wParam)){
|
---|
1518 | case IDC_BS_DEFPUSHBUTTON:
|
---|
1519 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1520 | //変更情報
|
---|
1521 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1522 |
|
---|
1523 | if(SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_GETCHECK,0,0)){
|
---|
1524 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_OWNERDRAW;
|
---|
1525 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_DEFPUSHBUTTON;
|
---|
1526 | SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
1527 | }
|
---|
1528 | else
|
---|
1529 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_DEFPUSHBUTTON;
|
---|
1530 | DrawRadWindow(i,pWindowInfo);
|
---|
1531 | return 1;
|
---|
1532 | }
|
---|
1533 | break;
|
---|
1534 | case IDC_BS_OWNERDRAW:
|
---|
1535 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1536 | //変更情報
|
---|
1537 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1538 |
|
---|
1539 | if(SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_GETCHECK,0,0)){
|
---|
1540 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_DEFPUSHBUTTON;
|
---|
1541 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_OWNERDRAW;
|
---|
1542 | SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
1543 | }
|
---|
1544 | else
|
---|
1545 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_OWNERDRAW;
|
---|
1546 | DrawRadWindow(i,pWindowInfo);
|
---|
1547 | return 1;
|
---|
1548 | }
|
---|
1549 | break;
|
---|
1550 | case IDC_BS_ICON:
|
---|
1551 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1552 | //変更情報
|
---|
1553 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1554 |
|
---|
1555 | if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
|
---|
1556 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_ICON;
|
---|
1557 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
|
---|
1558 | SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
1559 | }
|
---|
1560 | else
|
---|
1561 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
|
---|
1562 | DrawRadWindow(i,pWindowInfo);
|
---|
1563 | return 1;
|
---|
1564 | }
|
---|
1565 | break;
|
---|
1566 | case IDC_BS_BITMAP:
|
---|
1567 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1568 | //変更情報
|
---|
1569 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1570 |
|
---|
1571 | if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
|
---|
1572 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BITMAP;
|
---|
1573 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
|
---|
1574 | SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
1575 | }
|
---|
1576 | else
|
---|
1577 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
|
---|
1578 | DrawRadWindow(i,pWindowInfo);
|
---|
1579 | return 1;
|
---|
1580 | }
|
---|
1581 | break;
|
---|
1582 | case IDC_BS_MULTILINE:
|
---|
1583 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1584 | //変更情報
|
---|
1585 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1586 |
|
---|
1587 | if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
|
---|
1588 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_MULTILINE;
|
---|
1589 | else
|
---|
1590 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_MULTILINE;
|
---|
1591 | DrawRadWindow(i,pWindowInfo);
|
---|
1592 | return 1;
|
---|
1593 | }
|
---|
1594 | break;
|
---|
1595 | case IDC_BS_NOTIFY:
|
---|
1596 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1597 | //変更情報
|
---|
1598 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1599 |
|
---|
1600 | if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
|
---|
1601 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_NOTIFY;
|
---|
1602 | else
|
---|
1603 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_NOTIFY;
|
---|
1604 | return 1;
|
---|
1605 | }
|
---|
1606 | break;
|
---|
1607 |
|
---|
1608 | case IDC_BS_HPOS:
|
---|
1609 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
1610 | //変更情報
|
---|
1611 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1612 |
|
---|
1613 | i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
|
---|
1614 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
|
---|
1615 | if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_LEFT;
|
---|
1616 | else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_RIGHT;
|
---|
1617 | else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_CENTER;
|
---|
1618 | DrawRadWindow(i,pWindowInfo);
|
---|
1619 | return 1;
|
---|
1620 | }
|
---|
1621 | break;
|
---|
1622 | case IDC_BS_VPOS:
|
---|
1623 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
1624 | //変更情報
|
---|
1625 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1626 |
|
---|
1627 | i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
|
---|
1628 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
|
---|
1629 | if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_TOP;
|
---|
1630 | else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BOTTOM;
|
---|
1631 | else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_VCENTER;
|
---|
1632 | DrawRadWindow(i,pWindowInfo);
|
---|
1633 | return 1;
|
---|
1634 | }
|
---|
1635 | break;
|
---|
1636 |
|
---|
1637 | case IDC_EXSTYLE:
|
---|
1638 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
1639 | DrawRadWindow(i,pWindowInfo);
|
---|
1640 | return 1;
|
---|
1641 | }
|
---|
1642 | break;
|
---|
1643 | }
|
---|
1644 | }
|
---|
1645 | return 0;
|
---|
1646 | }
|
---|
1647 |
|
---|
1648 |
|
---|
1649 | ////////////////////////
|
---|
1650 | // CHECKBOX プロパティ
|
---|
1651 | BOOL CALLBACK RadProperty_CheckBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
1652 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
1653 | int i,i2,i3;
|
---|
1654 | static BOOL bInitial;
|
---|
1655 |
|
---|
1656 | switch(message){
|
---|
1657 | case WM_INITDIALOG:
|
---|
1658 | {
|
---|
1659 | bInitial=1;
|
---|
1660 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1661 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1662 |
|
---|
1663 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
|
---|
1664 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
|
---|
1665 |
|
---|
1666 |
|
---|
1667 | ////////////
|
---|
1668 | //スタイル
|
---|
1669 |
|
---|
1670 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
1671 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
1672 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
1673 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
1674 |
|
---|
1675 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_AUTOCHECKBOX)==BS_AUTOCHECKBOX) SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
|
---|
1676 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_AUTO3STATE)==BS_AUTO3STATE){
|
---|
1677 | SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
|
---|
1678 | SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0);
|
---|
1679 | }
|
---|
1680 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_3STATE)==BS_3STATE) SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0);
|
---|
1681 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0);
|
---|
1682 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0);
|
---|
1683 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
|
---|
1684 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
1685 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
|
---|
1686 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
1687 |
|
---|
1688 |
|
---|
1689 | //////////////////
|
---|
1690 | // 水平方向の配置
|
---|
1691 | //////////////////
|
---|
1692 |
|
---|
1693 | //"デフォルト"
|
---|
1694 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
1695 | //"左端"
|
---|
1696 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
1697 | //"右端"
|
---|
1698 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
1699 | //"中央"
|
---|
1700 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
1701 |
|
---|
1702 | //ビットを考慮してBS_CENTERを最初に比較する
|
---|
1703 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
|
---|
1704 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
|
---|
1705 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
|
---|
1706 | else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
|
---|
1707 |
|
---|
1708 |
|
---|
1709 | //////////////////
|
---|
1710 | // 垂直方向の配置
|
---|
1711 | //////////////////
|
---|
1712 |
|
---|
1713 | //"デフォルト"
|
---|
1714 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
1715 | //"上端"
|
---|
1716 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
|
---|
1717 | //"下端"
|
---|
1718 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
|
---|
1719 | //"中央"
|
---|
1720 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
1721 |
|
---|
1722 | //ビットを考慮してBS_VCENTERを最初に比較する
|
---|
1723 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
|
---|
1724 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
|
---|
1725 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
|
---|
1726 | else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
|
---|
1727 |
|
---|
1728 |
|
---|
1729 | bInitial=0;
|
---|
1730 | break;
|
---|
1731 | }
|
---|
1732 | case WM_COMMAND:
|
---|
1733 | {
|
---|
1734 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1735 | if(i==-1) return 1;
|
---|
1736 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
1737 | WindowInfo *pWindowInfo = ProjectInfo.windowInfos[i2];
|
---|
1738 |
|
---|
1739 | //共通スタイル
|
---|
1740 | if(bInitial==0){
|
---|
1741 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
1742 | }
|
---|
1743 |
|
---|
1744 | switch(LOWORD(wParam)){
|
---|
1745 | case IDC_BS_AUTO:
|
---|
1746 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1747 | //変更情報
|
---|
1748 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1749 |
|
---|
1750 | if(SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_GETCHECK,0,0)){
|
---|
1751 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x04){
|
---|
1752 | //3state
|
---|
1753 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
|
---|
1754 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_AUTO3STATE;
|
---|
1755 | }
|
---|
1756 | else{
|
---|
1757 | //2state
|
---|
1758 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
|
---|
1759 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_AUTOCHECKBOX;
|
---|
1760 | }
|
---|
1761 | }
|
---|
1762 | else{
|
---|
1763 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x04){
|
---|
1764 | //3state
|
---|
1765 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
|
---|
1766 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_3STATE;
|
---|
1767 | }
|
---|
1768 | else{
|
---|
1769 | //2state
|
---|
1770 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
|
---|
1771 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_CHECKBOX;
|
---|
1772 | }
|
---|
1773 | }
|
---|
1774 | return 1;
|
---|
1775 | }
|
---|
1776 | break;
|
---|
1777 | case IDC_BS_3STATE:
|
---|
1778 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1779 | //変更情報
|
---|
1780 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1781 |
|
---|
1782 | if(SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_GETCHECK,0,0)){
|
---|
1783 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0F)==BS_CHECKBOX){
|
---|
1784 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
|
---|
1785 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_3STATE;
|
---|
1786 | }
|
---|
1787 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0F)==BS_AUTOCHECKBOX){
|
---|
1788 | //自動チェック
|
---|
1789 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
|
---|
1790 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_AUTO3STATE;
|
---|
1791 | }
|
---|
1792 | }
|
---|
1793 | else{
|
---|
1794 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0F)==BS_3STATE){
|
---|
1795 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
|
---|
1796 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_CHECKBOX;
|
---|
1797 | }
|
---|
1798 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0F)==BS_AUTO3STATE){
|
---|
1799 | //自動チェック
|
---|
1800 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=0xFFFFFFF0;
|
---|
1801 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_AUTOCHECKBOX;
|
---|
1802 | }
|
---|
1803 | }
|
---|
1804 | return 1;
|
---|
1805 | }
|
---|
1806 | break;
|
---|
1807 | case IDC_BS_PUSHLIKE:
|
---|
1808 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1809 | //変更情報
|
---|
1810 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1811 |
|
---|
1812 | if(SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_GETCHECK,0,0))
|
---|
1813 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_PUSHLIKE;
|
---|
1814 | else
|
---|
1815 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_PUSHLIKE;
|
---|
1816 | DrawRadWindow(i,pWindowInfo);
|
---|
1817 | return 1;
|
---|
1818 | }
|
---|
1819 | break;
|
---|
1820 | case IDC_BS_LEFTTEXT:
|
---|
1821 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1822 | //変更情報
|
---|
1823 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1824 |
|
---|
1825 | if(SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_GETCHECK,0,0))
|
---|
1826 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_LEFTTEXT;
|
---|
1827 | else
|
---|
1828 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_LEFTTEXT;
|
---|
1829 | DrawRadWindow(i,pWindowInfo);
|
---|
1830 | return 1;
|
---|
1831 | }
|
---|
1832 | break;
|
---|
1833 | case IDC_BS_ICON:
|
---|
1834 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1835 | //変更情報
|
---|
1836 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1837 |
|
---|
1838 | if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
|
---|
1839 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_ICON;
|
---|
1840 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
|
---|
1841 | SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
1842 | }
|
---|
1843 | else
|
---|
1844 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
|
---|
1845 | DrawRadWindow(i,pWindowInfo);
|
---|
1846 | return 1;
|
---|
1847 | }
|
---|
1848 | break;
|
---|
1849 | case IDC_BS_BITMAP:
|
---|
1850 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1851 | //変更情報
|
---|
1852 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1853 |
|
---|
1854 | if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
|
---|
1855 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BITMAP;
|
---|
1856 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
|
---|
1857 | SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
1858 | }
|
---|
1859 | else
|
---|
1860 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
|
---|
1861 | DrawRadWindow(i,pWindowInfo);
|
---|
1862 | return 1;
|
---|
1863 | }
|
---|
1864 | break;
|
---|
1865 | case IDC_BS_MULTILINE:
|
---|
1866 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1867 | //変更情報
|
---|
1868 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1869 |
|
---|
1870 | if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
|
---|
1871 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_MULTILINE;
|
---|
1872 | else
|
---|
1873 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_MULTILINE;
|
---|
1874 | DrawRadWindow(i,pWindowInfo);
|
---|
1875 | return 1;
|
---|
1876 | }
|
---|
1877 | break;
|
---|
1878 | case IDC_BS_NOTIFY:
|
---|
1879 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
1880 | //変更情報
|
---|
1881 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1882 |
|
---|
1883 | if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
|
---|
1884 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_NOTIFY;
|
---|
1885 | else
|
---|
1886 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_NOTIFY;
|
---|
1887 | return 1;
|
---|
1888 | }
|
---|
1889 | break;
|
---|
1890 |
|
---|
1891 | case IDC_BS_HPOS:
|
---|
1892 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
1893 | //変更情報
|
---|
1894 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1895 |
|
---|
1896 | i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
|
---|
1897 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
|
---|
1898 | if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_LEFT;
|
---|
1899 | else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_RIGHT;
|
---|
1900 | else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_CENTER;
|
---|
1901 | DrawRadWindow(i,pWindowInfo);
|
---|
1902 | return 1;
|
---|
1903 | }
|
---|
1904 | break;
|
---|
1905 | case IDC_BS_VPOS:
|
---|
1906 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
1907 | //変更情報
|
---|
1908 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
1909 |
|
---|
1910 | i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
|
---|
1911 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
|
---|
1912 | if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_TOP;
|
---|
1913 | else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BOTTOM;
|
---|
1914 | else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_VCENTER;
|
---|
1915 | DrawRadWindow(i,pWindowInfo);
|
---|
1916 | return 1;
|
---|
1917 | }
|
---|
1918 | break;
|
---|
1919 |
|
---|
1920 | case IDC_EXSTYLE:
|
---|
1921 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
1922 | DrawRadWindow(i,pWindowInfo);
|
---|
1923 | return 1;
|
---|
1924 | }
|
---|
1925 | }
|
---|
1926 | }
|
---|
1927 | return 0;
|
---|
1928 | }
|
---|
1929 |
|
---|
1930 |
|
---|
1931 | ///////////////////////
|
---|
1932 | // COMBOBOX プロパティ
|
---|
1933 |
|
---|
1934 | void RadProperty_ComboBox_StylingOrder(HWND hwnd,DWORD *style){
|
---|
1935 | if(!(*style&(CBS_OWNERDRAWFIXED|CBS_OWNERDRAWVARIABLE))){
|
---|
1936 | *style&=~(CBS_HASSTRINGS);
|
---|
1937 | SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
1938 | EnableWindow(GetDlgItem(hwnd,IDC_CBS_HASSTRINGS),0);
|
---|
1939 | }
|
---|
1940 | else EnableWindow(GetDlgItem(hwnd,IDC_CBS_HASSTRINGS),1);
|
---|
1941 | }
|
---|
1942 | BOOL CALLBACK RadProperty_ComboBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
1943 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
1944 | int i,i2,i3;
|
---|
1945 | static BOOL bInitial;
|
---|
1946 |
|
---|
1947 | switch(message){
|
---|
1948 | case WM_INITDIALOG:
|
---|
1949 | {
|
---|
1950 | bInitial=1;
|
---|
1951 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
1952 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
1953 |
|
---|
1954 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
|
---|
1955 |
|
---|
1956 |
|
---|
1957 | /////////////////////////////////
|
---|
1958 | // スタイル
|
---|
1959 | ////////////
|
---|
1960 |
|
---|
1961 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
1962 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
1963 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
1964 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
1965 |
|
---|
1966 | ////////
|
---|
1967 | // 選択
|
---|
1968 | ////////
|
---|
1969 |
|
---|
1970 | //"デフォルト"
|
---|
1971 | SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
1972 | //"ドロップ ダウン"
|
---|
1973 | SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWN);
|
---|
1974 | //"ドロップ ダウン リスト"
|
---|
1975 | SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWNLIST);
|
---|
1976 |
|
---|
1977 | //ビットを考慮してCBS_DROPDOWNLISTを最初に比較する
|
---|
1978 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_DROPDOWNLIST)==CBS_DROPDOWNLIST) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,2,0);
|
---|
1979 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_SIMPLE) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,0,0);
|
---|
1980 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_DROPDOWN) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,1,0);
|
---|
1981 |
|
---|
1982 |
|
---|
1983 | ////////////////
|
---|
1984 | // オーナー描画
|
---|
1985 | ////////////////
|
---|
1986 |
|
---|
1987 | //"なし"
|
---|
1988 | SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_NONE_);
|
---|
1989 | //"固定"
|
---|
1990 | SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_FIXED);
|
---|
1991 | //"可変"
|
---|
1992 | SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_VARIABLE);
|
---|
1993 |
|
---|
1994 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,1,0);
|
---|
1995 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_OWNERDRAWVARIABLE) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,2,0);
|
---|
1996 | else SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,0,0);
|
---|
1997 |
|
---|
1998 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_HASSTRINGS) SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_SETCHECK,BST_CHECKED,0);
|
---|
1999 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_SORT) SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_SETCHECK,BST_CHECKED,0);
|
---|
2000 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_NOINTEGRALHEIGHT) SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_SETCHECK,BST_CHECKED,0);
|
---|
2001 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0);
|
---|
2002 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
2003 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
2004 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_DISABLENOSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
2005 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_UPPERCASE) SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2006 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&CBS_LOWERCASE) SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2007 |
|
---|
2008 | RadProperty_ComboBox_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2009 |
|
---|
2010 |
|
---|
2011 | bInitial=0;
|
---|
2012 | break;
|
---|
2013 | }
|
---|
2014 | case WM_COMMAND:
|
---|
2015 | {
|
---|
2016 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
2017 | if(i==-1) return 1;
|
---|
2018 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
2019 | WindowInfo *pWindowInfo = ProjectInfo.windowInfos[i2];
|
---|
2020 |
|
---|
2021 | //共通スタイル
|
---|
2022 | if(bInitial==0){
|
---|
2023 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
2024 | }
|
---|
2025 |
|
---|
2026 | switch(LOWORD(wParam)){
|
---|
2027 | case IDC_CBS_TYPE:
|
---|
2028 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
2029 | //変更情報
|
---|
2030 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2031 |
|
---|
2032 | i3=SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_GETCURSEL,0,0);
|
---|
2033 | //CBS_DROPDOWNLIST=CBS_SIMPLE | CBS_DROPDOWN
|
---|
2034 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(CBS_DROPDOWNLIST);
|
---|
2035 | if(i3==0) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_SIMPLE;
|
---|
2036 | else if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_DROPDOWN;
|
---|
2037 | else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_DROPDOWNLIST;
|
---|
2038 |
|
---|
2039 | DrawRadWindow(i,pWindowInfo);
|
---|
2040 | return 1;
|
---|
2041 | }
|
---|
2042 | break;
|
---|
2043 | case IDC_CBS_OWNERDRAW:
|
---|
2044 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
2045 | //変更情報
|
---|
2046 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2047 |
|
---|
2048 | i3=SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_GETCURSEL,0,0);
|
---|
2049 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(CBS_OWNERDRAWFIXED|CBS_OWNERDRAWVARIABLE);
|
---|
2050 | if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_OWNERDRAWFIXED;
|
---|
2051 | else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_OWNERDRAWVARIABLE;
|
---|
2052 |
|
---|
2053 | RadProperty_ComboBox_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2054 | return 1;
|
---|
2055 | }
|
---|
2056 | break;
|
---|
2057 |
|
---|
2058 | case IDC_CBS_HASSTRINGS:
|
---|
2059 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2060 | //変更情報
|
---|
2061 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2062 |
|
---|
2063 | if(SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_GETCHECK,0,0))
|
---|
2064 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_HASSTRINGS;
|
---|
2065 | else
|
---|
2066 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_HASSTRINGS;
|
---|
2067 | return 1;
|
---|
2068 | }
|
---|
2069 | break;
|
---|
2070 | case IDC_CBS_SORT:
|
---|
2071 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2072 | //変更情報
|
---|
2073 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2074 |
|
---|
2075 | if(SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_GETCHECK,0,0))
|
---|
2076 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_SORT;
|
---|
2077 | else
|
---|
2078 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_SORT;
|
---|
2079 | return 1;
|
---|
2080 | }
|
---|
2081 | break;
|
---|
2082 | case IDC_CBS_NOINTEGRALHEIGHT:
|
---|
2083 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2084 | //変更情報
|
---|
2085 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2086 |
|
---|
2087 | if(SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_GETCHECK,0,0))
|
---|
2088 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_NOINTEGRALHEIGHT;
|
---|
2089 | else
|
---|
2090 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_NOINTEGRALHEIGHT;
|
---|
2091 | return 1;
|
---|
2092 | }
|
---|
2093 | break;
|
---|
2094 | case IDC_CBS_OEMCONVERT:
|
---|
2095 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2096 | //変更情報
|
---|
2097 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2098 |
|
---|
2099 | if(SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_GETCHECK,0,0))
|
---|
2100 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_OEMCONVERT;
|
---|
2101 | else
|
---|
2102 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_OEMCONVERT;
|
---|
2103 | return 1;
|
---|
2104 | }
|
---|
2105 | break;
|
---|
2106 | case IDC_STYLE_VSCROLL:
|
---|
2107 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2108 | //変更情報
|
---|
2109 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2110 |
|
---|
2111 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0))
|
---|
2112 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=WS_VSCROLL;
|
---|
2113 | else
|
---|
2114 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~WS_VSCROLL;
|
---|
2115 | DrawRadWindow(i,pWindowInfo);
|
---|
2116 | return 1;
|
---|
2117 | }
|
---|
2118 | break;
|
---|
2119 | case IDC_CBS_AUTOHSCROLL:
|
---|
2120 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2121 | //変更情報
|
---|
2122 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2123 |
|
---|
2124 | if(SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_GETCHECK,0,0))
|
---|
2125 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_AUTOHSCROLL;
|
---|
2126 | else
|
---|
2127 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_AUTOHSCROLL;
|
---|
2128 | return 1;
|
---|
2129 | }
|
---|
2130 | break;
|
---|
2131 | case IDC_CBS_DISABLENOSCROLL:
|
---|
2132 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2133 | //変更情報
|
---|
2134 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2135 |
|
---|
2136 | if(SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_GETCHECK,0,0))
|
---|
2137 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_DISABLENOSCROLL;
|
---|
2138 | else
|
---|
2139 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_DISABLENOSCROLL;
|
---|
2140 | DrawRadWindow(i,pWindowInfo);
|
---|
2141 | return 1;
|
---|
2142 | }
|
---|
2143 | break;
|
---|
2144 | case IDC_CBS_UPPERCASE:
|
---|
2145 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2146 | //変更情報
|
---|
2147 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2148 |
|
---|
2149 | if(SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_GETCHECK,0,0))
|
---|
2150 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_UPPERCASE;
|
---|
2151 | else
|
---|
2152 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_UPPERCASE;
|
---|
2153 | return 1;
|
---|
2154 | }
|
---|
2155 | break;
|
---|
2156 | case IDC_CBS_LOWERCASE:
|
---|
2157 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2158 | //変更情報
|
---|
2159 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2160 |
|
---|
2161 | if(SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_GETCHECK,0,0))
|
---|
2162 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=CBS_LOWERCASE;
|
---|
2163 | else
|
---|
2164 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~CBS_LOWERCASE;
|
---|
2165 | return 1;
|
---|
2166 | }
|
---|
2167 | break;
|
---|
2168 |
|
---|
2169 | case IDC_EXSTYLE:
|
---|
2170 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
2171 | DrawRadWindow(i,pWindowInfo);
|
---|
2172 | return 1;
|
---|
2173 | }
|
---|
2174 | break;
|
---|
2175 | }
|
---|
2176 | }
|
---|
2177 | return 0;
|
---|
2178 | }
|
---|
2179 |
|
---|
2180 |
|
---|
2181 | /////////////////////
|
---|
2182 | // EDIT プロパティ
|
---|
2183 |
|
---|
2184 | void RadProperty_Edit_StylingOrder(HWND hwnd,DWORD *style){
|
---|
2185 | if(*style&ES_MULTILINE){
|
---|
2186 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_HSCROLL),1);
|
---|
2187 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_VSCROLL),1);
|
---|
2188 | EnableWindow(GetDlgItem(hwnd,IDC_ES_AUTOVSCROLL),1);
|
---|
2189 |
|
---|
2190 | *style&=~(ES_PASSWORD);
|
---|
2191 | SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
2192 | EnableWindow(GetDlgItem(hwnd,IDC_ES_PASSWORD),0);
|
---|
2193 | }
|
---|
2194 | else{
|
---|
2195 | EnableWindow(GetDlgItem(hwnd,IDC_ES_PASSWORD),1);
|
---|
2196 |
|
---|
2197 | *style&=~(WS_HSCROLL|WS_VSCROLL|ES_AUTOVSCROLL);
|
---|
2198 | SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
2199 | SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
2200 | SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
2201 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_HSCROLL),0);
|
---|
2202 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_VSCROLL),0);
|
---|
2203 | EnableWindow(GetDlgItem(hwnd,IDC_ES_AUTOVSCROLL),0);
|
---|
2204 | }
|
---|
2205 | }
|
---|
2206 | BOOL CALLBACK RadProperty_EditProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
2207 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
2208 | int i,i2,i3;
|
---|
2209 | static BOOL bInitial;
|
---|
2210 |
|
---|
2211 | switch(message){
|
---|
2212 | case WM_INITDIALOG:
|
---|
2213 | {
|
---|
2214 | bInitial=1;
|
---|
2215 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
2216 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
2217 |
|
---|
2218 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
|
---|
2219 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
|
---|
2220 |
|
---|
2221 |
|
---|
2222 | ////////////
|
---|
2223 | // スタイル
|
---|
2224 | ////////////
|
---|
2225 |
|
---|
2226 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
2227 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2228 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
2229 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
2230 |
|
---|
2231 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_MULTILINE) SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2232 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_NUMBER) SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_SETCHECK,BST_CHECKED,0);
|
---|
2233 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
2234 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
2235 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
2236 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_AUTOVSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
2237 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_PASSWORD) SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_SETCHECK,BST_CHECKED,0);
|
---|
2238 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_NOHIDESEL) SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_SETCHECK,BST_CHECKED,0);
|
---|
2239 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0);
|
---|
2240 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_WANTRETURN) SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_SETCHECK,BST_CHECKED,0);
|
---|
2241 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_UPPERCASE) SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2242 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_LOWERCASE) SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2243 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_READONLY) SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_SETCHECK,BST_CHECKED,0);
|
---|
2244 |
|
---|
2245 |
|
---|
2246 | //////////////////
|
---|
2247 | // テキストの配置
|
---|
2248 | //////////////////
|
---|
2249 |
|
---|
2250 | //"左端"
|
---|
2251 | SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
2252 | //"中央"
|
---|
2253 | SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
2254 | //"右端"
|
---|
2255 | SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
2256 |
|
---|
2257 | //ビットを考慮してES_LEFTを最後に検討する
|
---|
2258 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_CENTER) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,1,0);
|
---|
2259 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&ES_RIGHT) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,2,0);
|
---|
2260 | else SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,0,0);
|
---|
2261 |
|
---|
2262 | RadProperty_Edit_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2263 |
|
---|
2264 |
|
---|
2265 | bInitial=0;
|
---|
2266 | break;
|
---|
2267 | }
|
---|
2268 | case WM_COMMAND:
|
---|
2269 | {
|
---|
2270 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
2271 | if(i==-1) return 1;
|
---|
2272 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
2273 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
2274 |
|
---|
2275 | //共通スタイル
|
---|
2276 | if(bInitial==0){
|
---|
2277 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
2278 | }
|
---|
2279 |
|
---|
2280 | switch(LOWORD(wParam)){
|
---|
2281 | case IDC_ES_MULTILINE:
|
---|
2282 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2283 | //変更情報
|
---|
2284 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2285 |
|
---|
2286 | if(SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_GETCHECK,0,0))
|
---|
2287 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_MULTILINE;
|
---|
2288 | else
|
---|
2289 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_MULTILINE;
|
---|
2290 | RadProperty_Edit_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2291 | DrawRadWindow(i,pWindowInfo);
|
---|
2292 | return 1;
|
---|
2293 | }
|
---|
2294 | break;
|
---|
2295 | case IDC_ES_NUMBER:
|
---|
2296 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2297 | //変更情報
|
---|
2298 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2299 |
|
---|
2300 | if(SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_GETCHECK,0,0))
|
---|
2301 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_NUMBER;
|
---|
2302 | else
|
---|
2303 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_NUMBER;
|
---|
2304 | return 1;
|
---|
2305 | }
|
---|
2306 | break;
|
---|
2307 | case IDC_STYLE_HSCROLL:
|
---|
2308 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2309 | //変更情報
|
---|
2310 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2311 |
|
---|
2312 | if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_GETCHECK,0,0))
|
---|
2313 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=WS_HSCROLL;
|
---|
2314 | else
|
---|
2315 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~WS_HSCROLL;
|
---|
2316 | DrawRadWindow(i,pWindowInfo);
|
---|
2317 | return 1;
|
---|
2318 | }
|
---|
2319 | break;
|
---|
2320 | case IDC_ES_AUTOHSCROLL:
|
---|
2321 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2322 | //変更情報
|
---|
2323 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2324 |
|
---|
2325 | if(SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_GETCHECK,0,0))
|
---|
2326 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_AUTOHSCROLL;
|
---|
2327 | else
|
---|
2328 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_AUTOHSCROLL;
|
---|
2329 | DrawRadWindow(i,pWindowInfo);
|
---|
2330 | return 1;
|
---|
2331 | }
|
---|
2332 | break;
|
---|
2333 | case IDC_STYLE_VSCROLL:
|
---|
2334 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2335 | //変更情報
|
---|
2336 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2337 |
|
---|
2338 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0))
|
---|
2339 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=WS_VSCROLL;
|
---|
2340 | else
|
---|
2341 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~WS_VSCROLL;
|
---|
2342 | DrawRadWindow(i,pWindowInfo);
|
---|
2343 | return 1;
|
---|
2344 | }
|
---|
2345 | break;
|
---|
2346 | case IDC_ES_AUTOVSCROLL:
|
---|
2347 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2348 | //変更情報
|
---|
2349 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2350 |
|
---|
2351 | if(SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_GETCHECK,0,0))
|
---|
2352 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_AUTOVSCROLL;
|
---|
2353 | else
|
---|
2354 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_AUTOVSCROLL;
|
---|
2355 | DrawRadWindow(i,pWindowInfo);
|
---|
2356 | return 1;
|
---|
2357 | }
|
---|
2358 | break;
|
---|
2359 | case IDC_ES_PASSWORD:
|
---|
2360 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2361 | //変更情報
|
---|
2362 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2363 |
|
---|
2364 | if(SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_GETCHECK,0,0))
|
---|
2365 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_PASSWORD;
|
---|
2366 | else
|
---|
2367 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_PASSWORD;
|
---|
2368 | DrawRadWindow(i,pWindowInfo);
|
---|
2369 | return 1;
|
---|
2370 | }
|
---|
2371 | break;
|
---|
2372 | case IDC_ES_NOHIDESEL:
|
---|
2373 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2374 | //変更情報
|
---|
2375 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2376 |
|
---|
2377 | if(SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_GETCHECK,0,0))
|
---|
2378 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_NOHIDESEL;
|
---|
2379 | else
|
---|
2380 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_NOHIDESEL;
|
---|
2381 | DrawRadWindow(i,pWindowInfo);
|
---|
2382 | return 1;
|
---|
2383 | }
|
---|
2384 | break;
|
---|
2385 | case IDC_ES_OEMCONVERT:
|
---|
2386 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2387 | //変更情報
|
---|
2388 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2389 |
|
---|
2390 | if(SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_GETCHECK,0,0))
|
---|
2391 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_OEMCONVERT;
|
---|
2392 | else
|
---|
2393 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_OEMCONVERT;
|
---|
2394 | DrawRadWindow(i,pWindowInfo);
|
---|
2395 | return 1;
|
---|
2396 | }
|
---|
2397 | break;
|
---|
2398 | case IDC_ES_WANTRETURN:
|
---|
2399 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2400 | //変更情報
|
---|
2401 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2402 |
|
---|
2403 | if(SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_GETCHECK,0,0))
|
---|
2404 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_WANTRETURN;
|
---|
2405 | else
|
---|
2406 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_WANTRETURN;
|
---|
2407 | DrawRadWindow(i,pWindowInfo);
|
---|
2408 | return 1;
|
---|
2409 | }
|
---|
2410 | break;
|
---|
2411 | case IDC_ES_UPPERCASE:
|
---|
2412 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2413 | //変更情報
|
---|
2414 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2415 |
|
---|
2416 | if(SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_GETCHECK,0,0)){
|
---|
2417 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_LOWERCASE;
|
---|
2418 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_UPPERCASE;
|
---|
2419 | SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
2420 | }
|
---|
2421 | else
|
---|
2422 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_UPPERCASE;
|
---|
2423 | DrawRadWindow(i,pWindowInfo);
|
---|
2424 | return 1;
|
---|
2425 | }
|
---|
2426 | break;
|
---|
2427 | case IDC_ES_LOWERCASE:
|
---|
2428 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2429 | //変更情報
|
---|
2430 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2431 |
|
---|
2432 | if(SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_GETCHECK,0,0)){
|
---|
2433 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_UPPERCASE;
|
---|
2434 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_LOWERCASE;
|
---|
2435 | SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
2436 | }
|
---|
2437 | else
|
---|
2438 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_LOWERCASE;
|
---|
2439 | DrawRadWindow(i,pWindowInfo);
|
---|
2440 | return 1;
|
---|
2441 | }
|
---|
2442 | break;
|
---|
2443 | case IDC_ES_READONLY:
|
---|
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]]->style);
|
---|
2447 |
|
---|
2448 | if(SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_GETCHECK,0,0))
|
---|
2449 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_READONLY;
|
---|
2450 | else
|
---|
2451 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~ES_READONLY;
|
---|
2452 | DrawRadWindow(i,pWindowInfo);
|
---|
2453 | return 1;
|
---|
2454 | }
|
---|
2455 | break;
|
---|
2456 |
|
---|
2457 | case IDC_ES_TEXTPOS:
|
---|
2458 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
2459 | //変更情報
|
---|
2460 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2461 |
|
---|
2462 | i3=SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_GETCURSEL,0,0);
|
---|
2463 | //ES_LEFT=0
|
---|
2464 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(ES_CENTER|ES_RIGHT);
|
---|
2465 | if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_CENTER;
|
---|
2466 | else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=ES_RIGHT;
|
---|
2467 | DrawRadWindow(i,pWindowInfo);
|
---|
2468 | return 1;
|
---|
2469 | }
|
---|
2470 | break;
|
---|
2471 |
|
---|
2472 | case IDC_EXSTYLE:
|
---|
2473 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
2474 | DrawRadWindow(i,pWindowInfo);
|
---|
2475 | return 1;
|
---|
2476 | }
|
---|
2477 | break;
|
---|
2478 | }
|
---|
2479 | }
|
---|
2480 | return 0;
|
---|
2481 | }
|
---|
2482 |
|
---|
2483 |
|
---|
2484 | ////////////////////////
|
---|
2485 | // GROUPBOX プロパティ
|
---|
2486 |
|
---|
2487 | BOOL CALLBACK RadProperty_GroupBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
2488 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
2489 | int i,i2,i3;
|
---|
2490 | static BOOL bInitial;
|
---|
2491 |
|
---|
2492 | switch(message){
|
---|
2493 | case WM_INITDIALOG:
|
---|
2494 | {
|
---|
2495 | bInitial=1;
|
---|
2496 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
2497 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
2498 |
|
---|
2499 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
|
---|
2500 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->caption);
|
---|
2501 |
|
---|
2502 |
|
---|
2503 | /////////////////////////////
|
---|
2504 | // スタイル
|
---|
2505 | ////////////
|
---|
2506 |
|
---|
2507 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
2508 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2509 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
2510 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
2511 |
|
---|
2512 |
|
---|
2513 | //////////////////
|
---|
2514 | // 水平方向の配置
|
---|
2515 | //////////////////
|
---|
2516 |
|
---|
2517 | //"デフォルト"
|
---|
2518 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
2519 | //"左端"
|
---|
2520 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
2521 | //"右端"
|
---|
2522 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
2523 | //"中央"
|
---|
2524 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
2525 |
|
---|
2526 | //ビットを考慮してBS_CENTERを最初に検討する
|
---|
2527 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,3,0);
|
---|
2528 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,1,0);
|
---|
2529 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,2,0);
|
---|
2530 | else SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,0,0);
|
---|
2531 |
|
---|
2532 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
|
---|
2533 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
2534 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
2535 |
|
---|
2536 |
|
---|
2537 | bInitial=0;
|
---|
2538 | break;
|
---|
2539 | }
|
---|
2540 | case WM_COMMAND:
|
---|
2541 | {
|
---|
2542 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
2543 | if(i==-1) return 1;
|
---|
2544 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
2545 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
2546 |
|
---|
2547 | //共通スタイル
|
---|
2548 | if(bInitial==0){
|
---|
2549 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
2550 | }
|
---|
2551 |
|
---|
2552 | switch(LOWORD(wParam)){
|
---|
2553 | case IDC_BS_POSITION:
|
---|
2554 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
2555 | //変更情報
|
---|
2556 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2557 |
|
---|
2558 | i3=SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_GETCURSEL,0,0);
|
---|
2559 | //BS_CENTER=BS_LEFT | BS_RIGHT
|
---|
2560 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(BS_CENTER);
|
---|
2561 | if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_LEFT;
|
---|
2562 | else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_RIGHT;
|
---|
2563 | else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_CENTER;
|
---|
2564 | DrawRadWindow(i,pWindowInfo);
|
---|
2565 | return 1;
|
---|
2566 | }
|
---|
2567 | break;
|
---|
2568 |
|
---|
2569 | case IDC_BS_ICON:
|
---|
2570 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2571 | //変更情報
|
---|
2572 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2573 |
|
---|
2574 | if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0))
|
---|
2575 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_ICON;
|
---|
2576 | else
|
---|
2577 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_ICON;
|
---|
2578 | DrawRadWindow(i,pWindowInfo);
|
---|
2579 | return 1;
|
---|
2580 | }
|
---|
2581 | break;
|
---|
2582 | case IDC_BS_BITMAP:
|
---|
2583 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2584 | //変更情報
|
---|
2585 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2586 |
|
---|
2587 | if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0))
|
---|
2588 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_BITMAP;
|
---|
2589 | else
|
---|
2590 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_BITMAP;
|
---|
2591 | DrawRadWindow(i,pWindowInfo);
|
---|
2592 | return 1;
|
---|
2593 | }
|
---|
2594 | break;
|
---|
2595 | case IDC_BS_NOTIFY:
|
---|
2596 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2597 | //変更情報
|
---|
2598 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2599 |
|
---|
2600 | if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
|
---|
2601 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=BS_NOTIFY;
|
---|
2602 | else
|
---|
2603 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~BS_NOTIFY;
|
---|
2604 | return 1;
|
---|
2605 | }
|
---|
2606 | break;
|
---|
2607 |
|
---|
2608 | case IDC_EXSTYLE:
|
---|
2609 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
2610 | DrawRadWindow(i,pWindowInfo);
|
---|
2611 | return 1;
|
---|
2612 | }
|
---|
2613 | break;
|
---|
2614 | }
|
---|
2615 | }
|
---|
2616 | return 0;
|
---|
2617 | }
|
---|
2618 |
|
---|
2619 |
|
---|
2620 | ////////////////////////
|
---|
2621 | // IMAGEBOX プロパティ
|
---|
2622 |
|
---|
2623 | void RadProperty_ImageBox_StylingOrder(HWND hwnd,DWORD *style){
|
---|
2624 | if((*style&0x000F)==SS_ICON||
|
---|
2625 | (*style&0x000F)==SS_BITMAP){
|
---|
2626 | EnableWindow(GetDlgItem(hwnd,IDC_PATH),1);
|
---|
2627 | EnableWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),1);
|
---|
2628 | EnableWindow(GetDlgItem(hwnd,IDC_SS_CENTERIMAGE),1);
|
---|
2629 | EnableWindow(GetDlgItem(hwnd,IDC_SS_RIGHTJUST),1);
|
---|
2630 | }
|
---|
2631 | else{
|
---|
2632 | EnableWindow(GetDlgItem(hwnd,IDC_PATH),0);
|
---|
2633 | EnableWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),0);
|
---|
2634 | EnableWindow(GetDlgItem(hwnd,IDC_SS_CENTERIMAGE),0);
|
---|
2635 | EnableWindow(GetDlgItem(hwnd,IDC_SS_RIGHTJUST),0);
|
---|
2636 | }
|
---|
2637 | }
|
---|
2638 | BOOL CALLBACK RadProperty_ImageBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
2639 | extern HANDLE hHeap;
|
---|
2640 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
2641 | int i,i2,i3;
|
---|
2642 | char temporary[MAX_PATH];
|
---|
2643 | static BOOL bInitial;
|
---|
2644 |
|
---|
2645 | switch(message){
|
---|
2646 | case WM_INITDIALOG:
|
---|
2647 | {
|
---|
2648 | bInitial=1;
|
---|
2649 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
2650 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
2651 |
|
---|
2652 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
|
---|
2653 |
|
---|
2654 |
|
---|
2655 | /////////////////////////////
|
---|
2656 | // スタイル
|
---|
2657 | ////////////
|
---|
2658 |
|
---|
2659 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
2660 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2661 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
2662 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
2663 |
|
---|
2664 | //////////
|
---|
2665 | // タイプ
|
---|
2666 | //////////
|
---|
2667 |
|
---|
2668 | //"フレーム(黒)"
|
---|
2669 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_BLACK);
|
---|
2670 | //"フレーム(灰色)"
|
---|
2671 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_GRAY);
|
---|
2672 | //"フレーム(白)"
|
---|
2673 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_WHITE);
|
---|
2674 | //"フレーム(縁取り)"
|
---|
2675 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_ETCHED);
|
---|
2676 | //"四角形(黒)"
|
---|
2677 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_BLACK);
|
---|
2678 | //"四角形(灰色)"
|
---|
2679 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_GRAY);
|
---|
2680 | //"四角形(白)"
|
---|
2681 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_WHITE);
|
---|
2682 | //"アイコン"
|
---|
2683 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_ICON);
|
---|
2684 | //"ビットマップ"
|
---|
2685 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_BITMAP);
|
---|
2686 |
|
---|
2687 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BLACKFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,0,0);
|
---|
2688 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_GRAYFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,1,0);
|
---|
2689 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_WHITEFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,2,0);
|
---|
2690 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000001F)==SS_ETCHEDFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,3,0);
|
---|
2691 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BLACKRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,4,0);
|
---|
2692 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_GRAYRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,5,0);
|
---|
2693 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_WHITERECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,6,0);
|
---|
2694 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON||
|
---|
2695 | (pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP){
|
---|
2696 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,7,0);
|
---|
2697 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,8,0);
|
---|
2698 |
|
---|
2699 | //リソース/ファイル スイッチチェックを表示
|
---|
2700 | ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW);
|
---|
2701 | ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW);
|
---|
2702 |
|
---|
2703 | //イメージ状態テキストを表示
|
---|
2704 | ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW);
|
---|
2705 |
|
---|
2706 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
2707 | //ファイル指定を表示
|
---|
2708 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
|
---|
2709 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
|
---|
2710 | SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
|
---|
2711 |
|
---|
2712 | //イメージ状態テキスト
|
---|
2713 | //"ファイル指定:"
|
---|
2714 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
|
---|
2715 |
|
---|
2716 | SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2717 | }
|
---|
2718 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_RES){
|
---|
2719 | //リソース指定を表示
|
---|
2720 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
|
---|
2721 |
|
---|
2722 | //イメージ状態テキスト
|
---|
2723 | //"リソース指定:"
|
---|
2724 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
|
---|
2725 |
|
---|
2726 | SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2727 |
|
---|
2728 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
|
---|
2729 |
|
---|
2730 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON){
|
---|
2731 | //アイコンリソースをコンボボックスに挿入
|
---|
2732 | for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++)
|
---|
2733 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
2734 | }
|
---|
2735 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP){
|
---|
2736 | //ビットマップリソースをコンボボックスに挿入
|
---|
2737 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++)
|
---|
2738 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
2739 | }
|
---|
2740 |
|
---|
2741 | //リストから選択
|
---|
2742 | i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_FINDSTRING,0,(long)pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
|
---|
2743 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
|
---|
2744 | }
|
---|
2745 | }
|
---|
2746 |
|
---|
2747 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SS_NOTIFY) SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
2748 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SS_CENTERIMAGE) SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2749 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&SS_RIGHTJUST) SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_SETCHECK,BST_CHECKED,0);
|
---|
2750 |
|
---|
2751 | RadProperty_ImageBox_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2752 |
|
---|
2753 | bInitial=0;
|
---|
2754 | break;
|
---|
2755 | }
|
---|
2756 | case WM_COMMAND:
|
---|
2757 | {
|
---|
2758 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
2759 | if(i==-1) return 1;
|
---|
2760 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
2761 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
2762 |
|
---|
2763 | //共通スタイル
|
---|
2764 | if(bInitial==0){
|
---|
2765 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
2766 | }
|
---|
2767 |
|
---|
2768 | switch(LOWORD(wParam)){
|
---|
2769 | case IDC_IMAGE_TYPE:
|
---|
2770 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
2771 | //変更情報
|
---|
2772 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2773 |
|
---|
2774 | i3=SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_GETCURSEL,0,0);
|
---|
2775 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~(0x0000001F);
|
---|
2776 | if(i3==0) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_BLACKFRAME;
|
---|
2777 | else if(i3==1) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_GRAYFRAME;
|
---|
2778 | else if(i3==2) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_WHITEFRAME;
|
---|
2779 | else if(i3==3) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_ETCHEDFRAME;
|
---|
2780 | else if(i3==4) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_BLACKRECT;
|
---|
2781 | else if(i3==5) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_GRAYRECT;
|
---|
2782 | else if(i3==6) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_WHITERECT;
|
---|
2783 | else if(i3==7) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_ICON;
|
---|
2784 | else if(i3==8) pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_BITMAP;
|
---|
2785 |
|
---|
2786 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON||
|
---|
2787 | (pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP){
|
---|
2788 | //リソース/ファイル スイッチチェックを表示
|
---|
2789 | ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW);
|
---|
2790 | ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW);
|
---|
2791 |
|
---|
2792 | //イメージ状態テキストを表示
|
---|
2793 | ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW);
|
---|
2794 |
|
---|
2795 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
2796 | //ファイル指定を表示
|
---|
2797 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
|
---|
2798 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
|
---|
2799 | SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
|
---|
2800 |
|
---|
2801 | //イメージ状態テキスト
|
---|
2802 | //"ファイル指定:"
|
---|
2803 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
|
---|
2804 |
|
---|
2805 | SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2806 | }
|
---|
2807 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_RES){
|
---|
2808 | //リソース指定を表示
|
---|
2809 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
|
---|
2810 |
|
---|
2811 | //イメージ状態テキスト
|
---|
2812 | //"リソース指定:"
|
---|
2813 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
|
---|
2814 |
|
---|
2815 | SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2816 |
|
---|
2817 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
|
---|
2818 |
|
---|
2819 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON){
|
---|
2820 | //アイコンリソースをコンボボックスに挿入
|
---|
2821 | for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){
|
---|
2822 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
2823 |
|
---|
2824 | if(lstrcmp(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path,ProjectInfo.res.pIconResInfo[i3].IdName)==0)
|
---|
2825 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
|
---|
2826 | }
|
---|
2827 | }
|
---|
2828 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP){
|
---|
2829 | //ビットマップリソースをコンボボックスに挿入
|
---|
2830 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++){
|
---|
2831 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
2832 |
|
---|
2833 | if(lstrcmp(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path,ProjectInfo.res.pBitmapResInfo[i3].IdName)==0)
|
---|
2834 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
|
---|
2835 | }
|
---|
2836 | }
|
---|
2837 | }
|
---|
2838 | }
|
---|
2839 | else{
|
---|
2840 | //リソース/ファイル スイッチチェックを非表示
|
---|
2841 | ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_HIDE);
|
---|
2842 | ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_HIDE);
|
---|
2843 |
|
---|
2844 | //イメージ状態テキストを非表示
|
---|
2845 | ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_HIDE);
|
---|
2846 |
|
---|
2847 | //ファイル指定を非表示
|
---|
2848 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE);
|
---|
2849 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE);
|
---|
2850 |
|
---|
2851 | //リソース指定を非表示
|
---|
2852 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE);
|
---|
2853 | }
|
---|
2854 |
|
---|
2855 | RadProperty_ImageBox_StylingOrder(hwnd,&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2856 | DrawRadWindow(i,pWindowInfo);
|
---|
2857 | return 1;
|
---|
2858 | }
|
---|
2859 | break;
|
---|
2860 |
|
---|
2861 | case IDC_FILE:
|
---|
2862 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
2863 | //変更無し
|
---|
2864 | break;
|
---|
2865 | }
|
---|
2866 |
|
---|
2867 | //変更情報
|
---|
2868 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo);
|
---|
2869 |
|
---|
2870 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type=IMGTYPE_FILE;
|
---|
2871 |
|
---|
2872 | //ファイル指定を表示
|
---|
2873 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
|
---|
2874 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
|
---|
2875 | SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
|
---|
2876 |
|
---|
2877 | //リソース指定を非表示
|
---|
2878 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE);
|
---|
2879 |
|
---|
2880 | //イメージ状態テキスト
|
---|
2881 | //"ファイル指定:"
|
---|
2882 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
|
---|
2883 |
|
---|
2884 | SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2885 | break;
|
---|
2886 |
|
---|
2887 | case IDC_RESOURCE:
|
---|
2888 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_RES){
|
---|
2889 | //変更無し
|
---|
2890 | break;
|
---|
2891 | }
|
---|
2892 |
|
---|
2893 | //変更情報
|
---|
2894 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo);
|
---|
2895 |
|
---|
2896 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type=IMGTYPE_RES;
|
---|
2897 |
|
---|
2898 | //ファイル指定を非表示
|
---|
2899 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE);
|
---|
2900 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE);
|
---|
2901 |
|
---|
2902 | //リソース指定を表示
|
---|
2903 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
|
---|
2904 |
|
---|
2905 | //イメージ状態テキスト
|
---|
2906 | //"リソース指定:"
|
---|
2907 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
|
---|
2908 |
|
---|
2909 | SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
|
---|
2910 |
|
---|
2911 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
|
---|
2912 |
|
---|
2913 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_ICON){
|
---|
2914 | //アイコンリソースをコンボボックスに挿入
|
---|
2915 | for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++)
|
---|
2916 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
2917 | }
|
---|
2918 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x0000000F)==SS_BITMAP){
|
---|
2919 | //ビットマップリソースをコンボボックスに挿入
|
---|
2920 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++)
|
---|
2921 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
2922 | }
|
---|
2923 | break;
|
---|
2924 |
|
---|
2925 | case IDC_RESCOMBO:
|
---|
2926 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
2927 | //変更情報
|
---|
2928 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo);
|
---|
2929 |
|
---|
2930 | i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETCURSEL,0,0);
|
---|
2931 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETLBTEXT,i3,(long)temporary);
|
---|
2932 |
|
---|
2933 | HeapDefaultFree(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
|
---|
2934 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
|
---|
2935 | lstrcpy(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path,temporary);
|
---|
2936 |
|
---|
2937 | DrawRadWindow(i,pWindowInfo);
|
---|
2938 | }
|
---|
2939 | break;
|
---|
2940 |
|
---|
2941 | case IDC_CHANGEPATH:
|
---|
2942 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2943 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
2944 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x000F)==SS_ICON){
|
---|
2945 | extern LPSTR IconFileFilter;
|
---|
2946 | //"アイコン ファイルを指定して下さい"
|
---|
2947 | if(!GetFilePathDialog(hwnd,temporary,IconFileFilter,STRING_IMAGEBOXPROP_GETPATH_ICON,1)) return 1;
|
---|
2948 | }
|
---|
2949 | else if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&0x000F)==SS_BITMAP){
|
---|
2950 | extern LPSTR BitmapFileFilter;
|
---|
2951 | //"ビットマップ ファイルを指定して下さい"
|
---|
2952 | if(!GetFilePathDialog(hwnd,temporary,BitmapFileFilter,STRING_IMAGEBOXPROP_GETPATH_BITMAP,1)) return 1;
|
---|
2953 | }
|
---|
2954 |
|
---|
2955 | //変更情報
|
---|
2956 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo);
|
---|
2957 |
|
---|
2958 | GetRelationalPath(temporary,ProjectInfo.dir);
|
---|
2959 | HeapDefaultFree(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
|
---|
2960 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
|
---|
2961 | lstrcpy(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path,temporary);
|
---|
2962 |
|
---|
2963 | SetDlgItemText(hwnd,IDC_PATH,temporary);
|
---|
2964 | DrawRadWindow(i,pWindowInfo);
|
---|
2965 | }
|
---|
2966 | return 1;
|
---|
2967 | }
|
---|
2968 | break;
|
---|
2969 |
|
---|
2970 | case IDC_SS_NOTIFY:
|
---|
2971 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2972 | //変更情報
|
---|
2973 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2974 |
|
---|
2975 | if(SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_GETCHECK,0,0))
|
---|
2976 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_NOTIFY;
|
---|
2977 | else
|
---|
2978 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~SS_NOTIFY;
|
---|
2979 | return 1;
|
---|
2980 | }
|
---|
2981 | break;
|
---|
2982 | case IDC_SS_CENTERIMAGE:
|
---|
2983 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2984 | //変更情報
|
---|
2985 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2986 |
|
---|
2987 | if(SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_GETCHECK,0,0))
|
---|
2988 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_CENTERIMAGE;
|
---|
2989 | else
|
---|
2990 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~SS_CENTERIMAGE;
|
---|
2991 | return 1;
|
---|
2992 | }
|
---|
2993 | break;
|
---|
2994 | case IDC_SS_RIGHTJUST:
|
---|
2995 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
2996 | //変更情報
|
---|
2997 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style);
|
---|
2998 |
|
---|
2999 | if(SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_GETCHECK,0,0))
|
---|
3000 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style|=SS_RIGHTJUST;
|
---|
3001 | else
|
---|
3002 | pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&=~SS_RIGHTJUST;
|
---|
3003 | return 1;
|
---|
3004 | }
|
---|
3005 | break;
|
---|
3006 |
|
---|
3007 | case IDC_EXSTYLE:
|
---|
3008 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
3009 | DrawRadWindow(i,pWindowInfo);
|
---|
3010 | return 1;
|
---|
3011 | }
|
---|
3012 | break;
|
---|
3013 | }
|
---|
3014 | }
|
---|
3015 | return 0;
|
---|
3016 | }
|
---|
3017 |
|
---|
3018 |
|
---|
3019 | ////////////////////////
|
---|
3020 | // LISTVIEW プロパティ
|
---|
3021 | BOOL CALLBACK RadProperty_ListViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
3022 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
3023 | int i,i2,i3;
|
---|
3024 | static BOOL bInitial;
|
---|
3025 |
|
---|
3026 | switch(message){
|
---|
3027 | case WM_INITDIALOG:
|
---|
3028 | {
|
---|
3029 | bInitial=1;
|
---|
3030 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
3031 | WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
3032 |
|
---|
3033 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
|
---|
3034 |
|
---|
3035 |
|
---|
3036 | /////////////////////////
|
---|
3037 | // スタイル
|
---|
3038 | ////////////
|
---|
3039 |
|
---|
3040 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
3041 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
3042 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
3043 | if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
3044 |
|
---|
3045 | ////////
|
---|
3046 | // 表示
|
---|
3047 | ////////
|
---|
3048 |
|
---|
3049 | //"アイコン"
|
---|
3050 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_ICON);
|
---|
3051 | //"小さいアイコン"
|
---|
3052 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_SMALLICON);
|
---|
3053 | //"リスト"
|
---|
3054 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_LIST);
|
---|
3055 | //"レポート"
|
---|
3056 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_REPORT);
|
---|
3057 |
|
---|
3058 | //ビットを考慮してLVS_LISTを最初に比較する
|
---|
3059 | if((pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_LIST)==LVS_LIST) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,2,0);
|
---|
3060 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_SMALLICON) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,1,0);
|
---|
3061 | else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->style&LVS_REPORT) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,3,0);
|
---|
3062 | else SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,0,0);
|
---|
3063 |
|
---|
3064 |
|
---|
3065 | ////////
|
---|
3066 | // 配置
|
---|
3067 | ////////
|
---|
3068 |
---|