Sync with trunk r63887.
[reactos.git] / dll / cpl / console / layout.c
1 /*
2 * PROJECT: ReactOS Console Configuration DLL
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll/win32/console/layout.c
5 * PURPOSE: Layout dialog
6 * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org)
7 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8 */
9
10 #include "console.h"
11
12 #define NDEBUG
13 #include <debug.h>
14
15 const WCHAR szPreviewText[] =
16 L"C:\\ReactOS> dir \n" \
17 L"SYSTEM <DIR> 13-04-15 5:00a\n" \
18 L"SYSTEM32 <DIR> 13-04-15 5:00a\n" \
19 L"readme txt 1739 13-04-15 5:00a\n" \
20 L"explorer exe 3329536 13-04-15 5:00a\n" \
21 L"vgafonts cab 18736 13-04-15 5:00a\n" \
22 L"setuplog txt 313 13-04-15 5:00a\n" \
23 L"win ini 7005 13-04-15 5:00a\n" ;
24
25
26 VOID
27 PaintConsole(LPDRAWITEMSTRUCT drawItem,
28 PCONSOLE_PROPS pConInfo)
29 {
30 PGUI_CONSOLE_INFO GuiInfo = pConInfo->TerminalInfo.TermInfo;
31 HBRUSH hBrush;
32 RECT cRect, fRect;
33 DWORD startx, starty;
34 DWORD endx, endy;
35 DWORD sizex, sizey;
36
37 FillRect(drawItem->hDC, &drawItem->rcItem, GetSysColorBrush(COLOR_BACKGROUND));
38
39 // FIXME: Use: SM_CXSIZE, SM_CYSIZE, SM_CXVSCROLL, SM_CYHSCROLL, SM_CXMIN, SM_CYMIN, SM_CXFRAME, SM_CYFRAME
40 /* Use it for scaling */
41 sizex = drawItem->rcItem.right - drawItem->rcItem.left;
42 sizey = drawItem->rcItem.bottom - drawItem->rcItem.top ;
43
44 if ( GuiInfo->WindowOrigin.x == MAXDWORD &&
45 GuiInfo->WindowOrigin.y == MAXDWORD )
46 {
47 startx = sizex / 3;
48 starty = sizey / 3;
49 }
50 else
51 {
52 // TODO:
53 // Calculate pos correctly when console centered
54 startx = GuiInfo->WindowOrigin.x;
55 starty = GuiInfo->WindowOrigin.y;
56 }
57
58 // TODO:
59 // Stretch console when bold fonts are selected
60 endx = startx + pConInfo->ci.ConsoleSize.X; // drawItem->rcItem.right - startx + 15;
61 endy = starty + pConInfo->ci.ConsoleSize.Y; // starty + sizey / 3;
62
63 /* Draw console size */
64 SetRect(&cRect, startx, starty, endx, endy);
65 FillRect(drawItem->hDC, &cRect, GetSysColorBrush(COLOR_WINDOWFRAME));
66
67 /* Draw console border */
68 SetRect(&fRect, startx + 1, starty + 1, cRect.right - 1, cRect.bottom - 1);
69 FrameRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
70
71 /* Draw left box */
72 SetRect(&fRect, startx + 3, starty + 3, startx + 5, starty + 5);
73 FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
74
75 /* Draw window title */
76 SetRect(&fRect, startx + 7, starty + 3, cRect.right - 9, starty + 5);
77 FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVECAPTION));
78
79 /* Draw first right box */
80 SetRect(&fRect, fRect.right + 1, starty + 3, fRect.right + 3, starty + 5);
81 FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
82
83 /* Draw second right box */
84 SetRect(&fRect, fRect.right + 1, starty + 3, fRect.right + 3, starty + 5);
85 FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
86
87 /* Draw scrollbar */
88 SetRect(&fRect, cRect.right - 5, fRect.bottom + 1, cRect.right - 3, cRect.bottom - 3);
89 FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_SCROLLBAR));
90
91 /* Draw console background */
92 hBrush = CreateSolidBrush(pConInfo->ci.Colors[BkgdAttribFromAttrib(pConInfo->ci.ScreenAttrib)]);
93 SetRect(&fRect, startx + 3, starty + 6, cRect.right - 6, cRect.bottom - 3);
94 FillRect(drawItem->hDC, &fRect, hBrush);
95 DeleteObject((HGDIOBJ)hBrush);
96 }
97
98 BOOL
99 PaintText(LPDRAWITEMSTRUCT drawItem,
100 PCONSOLE_PROPS pConInfo,
101 TEXT_TYPE TextMode)
102 {
103 PGUI_CONSOLE_INFO GuiInfo = pConInfo->TerminalInfo.TermInfo;
104 USHORT CurrentAttrib;
105 COLORREF pbkColor, ptColor;
106 COLORREF nbkColor, ntColor;
107 HBRUSH hBrush;
108 HFONT Font, OldFont;
109
110 if (TextMode == Screen)
111 CurrentAttrib = pConInfo->ci.ScreenAttrib;
112 else if (TextMode == Popup)
113 CurrentAttrib = pConInfo->ci.PopupAttrib;
114 else
115 return FALSE;
116
117 nbkColor = pConInfo->ci.Colors[BkgdAttribFromAttrib(CurrentAttrib)];
118 ntColor = pConInfo->ci.Colors[TextAttribFromAttrib(CurrentAttrib)];
119
120 hBrush = CreateSolidBrush(nbkColor);
121 if (!hBrush) return FALSE;
122
123 Font = CreateFontW(GuiInfo->FontSize.Y,
124 GuiInfo->FontSize.X,
125 0,
126 TA_BASELINE,
127 GuiInfo->FontWeight,
128 FALSE,
129 FALSE,
130 FALSE,
131 OEM_CHARSET,
132 OUT_DEFAULT_PRECIS,
133 CLIP_DEFAULT_PRECIS,
134 DEFAULT_QUALITY, // NONANTIALIASED_QUALITY ; ANTIALIASED_QUALITY
135 FIXED_PITCH | GuiInfo->FontFamily,
136 GuiInfo->FaceName);
137 if (Font == NULL)
138 {
139 DPRINT1("PaintText: CreateFont failed\n");
140 return FALSE;
141 }
142
143 OldFont = SelectObject(drawItem->hDC, Font);
144 if (OldFont == NULL)
145 {
146 DeleteObject(Font);
147 return FALSE;
148 }
149
150 FillRect(drawItem->hDC, &drawItem->rcItem, hBrush);
151
152 ptColor = SetTextColor(drawItem->hDC, ntColor);
153 pbkColor = SetBkColor(drawItem->hDC, nbkColor);
154 DrawTextW(drawItem->hDC, szPreviewText, wcslen(szPreviewText), &drawItem->rcItem, 0);
155 SetTextColor(drawItem->hDC, ptColor);
156 SetBkColor(drawItem->hDC, pbkColor);
157 DeleteObject((HGDIOBJ)hBrush);
158
159 SelectObject(drawItem->hDC, OldFont);
160 DeleteObject(Font);
161
162 return TRUE;
163 }
164
165 INT_PTR
166 CALLBACK
167 LayoutProc(HWND hwndDlg,
168 UINT uMsg,
169 WPARAM wParam,
170 LPARAM lParam)
171 {
172 PCONSOLE_PROPS pConInfo = (PCONSOLE_PROPS)GetWindowLongPtr(hwndDlg, DWLP_USER);
173 PGUI_CONSOLE_INFO GuiInfo = (pConInfo ? pConInfo->TerminalInfo.TermInfo : NULL);
174
175 UNREFERENCED_PARAMETER(hwndDlg);
176 UNREFERENCED_PARAMETER(wParam);
177
178 switch (uMsg)
179 {
180 case WM_INITDIALOG:
181 {
182 /* Multi-monitor support */
183 LONG xVirtScr, yVirtScr; // Coordinates of the top-left virtual screen
184 LONG cxVirtScr, cyVirtScr; // Width and Height of the virtual screen
185 LONG cxFrame , cyFrame ; // Thickness of the window frame
186
187 pConInfo = (PCONSOLE_PROPS)((LPPROPSHEETPAGE)lParam)->lParam;
188 GuiInfo = pConInfo->TerminalInfo.TermInfo;
189 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pConInfo);
190
191 /* Multi-monitor support */
192 xVirtScr = GetSystemMetrics(SM_XVIRTUALSCREEN);
193 yVirtScr = GetSystemMetrics(SM_YVIRTUALSCREEN);
194 cxVirtScr = GetSystemMetrics(SM_CXVIRTUALSCREEN);
195 cyVirtScr = GetSystemMetrics(SM_CYVIRTUALSCREEN);
196 cxFrame = GetSystemMetrics(SM_CXFRAME);
197 cyFrame = GetSystemMetrics(SM_CYFRAME);
198
199 SendDlgItemMessageW(hwndDlg, IDC_UPDOWN_SCREEN_BUFFER_HEIGHT, UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
200 SendDlgItemMessageW(hwndDlg, IDC_UPDOWN_SCREEN_BUFFER_WIDTH , UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
201 SendDlgItemMessageW(hwndDlg, IDC_UPDOWN_WINDOW_SIZE_HEIGHT, UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
202 SendDlgItemMessageW(hwndDlg, IDC_UPDOWN_WINDOW_SIZE_WIDTH , UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
203
204 SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, pConInfo->ci.ScreenBufferSize.Y, FALSE);
205 SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH , pConInfo->ci.ScreenBufferSize.X, FALSE);
206 SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT, pConInfo->ci.ConsoleSize.Y, FALSE);
207 SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH , pConInfo->ci.ConsoleSize.X, FALSE);
208
209 SendDlgItemMessageW(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT, UDM_SETRANGE, 0,
210 (LPARAM)MAKELONG(xVirtScr + cxVirtScr - cxFrame, xVirtScr - cxFrame));
211 SendDlgItemMessageW(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP , UDM_SETRANGE, 0,
212 (LPARAM)MAKELONG(yVirtScr + cyVirtScr - cyFrame, yVirtScr - cyFrame));
213
214 SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, GuiInfo->WindowOrigin.x, TRUE);
215 SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP , GuiInfo->WindowOrigin.y, TRUE);
216
217 if (GuiInfo->AutoPosition)
218 {
219 EnableDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, FALSE);
220 EnableDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_TOP , FALSE);
221 EnableDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT, FALSE);
222 EnableDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP , FALSE);
223 }
224 CheckDlgButton(hwndDlg, IDC_CHECK_SYSTEM_POS_WINDOW,
225 GuiInfo->AutoPosition ? BST_CHECKED : BST_UNCHECKED);
226
227 return TRUE;
228 }
229
230 case WM_DRAWITEM:
231 {
232 PaintConsole((LPDRAWITEMSTRUCT)lParam, pConInfo);
233 return TRUE;
234 }
235
236 case WM_NOTIFY:
237 {
238 LPNMUPDOWN lpnmud = (LPNMUPDOWN)lParam;
239 LPPSHNOTIFY lppsn = (LPPSHNOTIFY)lParam;
240
241 if (lppsn->hdr.code == UDN_DELTAPOS)
242 {
243 DWORD wheight, wwidth;
244 DWORD sheight, swidth;
245 DWORD left, top;
246
247 if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_WIDTH)
248 {
249 wwidth = lpnmud->iPos + lpnmud->iDelta;
250 }
251 else
252 {
253 wwidth = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH, NULL, FALSE);
254 }
255
256 if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_HEIGHT)
257 {
258 wheight = lpnmud->iPos + lpnmud->iDelta;
259 }
260 else
261 {
262 wheight = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT, NULL, FALSE);
263 }
264
265 if (lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_WIDTH)
266 {
267 swidth = lpnmud->iPos + lpnmud->iDelta;
268 }
269 else
270 {
271 swidth = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, NULL, FALSE);
272 }
273
274 if (lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_HEIGHT)
275 {
276 sheight = lpnmud->iPos + lpnmud->iDelta;
277 }
278 else
279 {
280 sheight = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, NULL, FALSE);
281 }
282
283 if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_POS_LEFT)
284 {
285 left = lpnmud->iPos + lpnmud->iDelta;
286 }
287 else
288 {
289 left = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, NULL, TRUE);
290 }
291
292 if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_POS_TOP)
293 {
294 top = lpnmud->iPos + lpnmud->iDelta;
295 }
296 else
297 {
298 top = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP, NULL, TRUE);
299 }
300
301 if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_WIDTH || lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_HEIGHT)
302 {
303 /* Automatically adjust screen buffer size when window size enlarges */
304 if (wwidth >= swidth)
305 {
306 SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, wwidth, TRUE);
307 swidth = wwidth;
308 }
309 if (wheight >= sheight)
310 {
311 SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, wheight, TRUE);
312 sheight = wheight;
313 }
314 }
315
316 /* Be sure that the (new) screen buffer sizes are in the correct range */
317 swidth = min(max(swidth , 1), 0xFFFF);
318 sheight = min(max(sheight, 1), 0xFFFF);
319
320 if (lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_WIDTH || lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_HEIGHT)
321 {
322 /* Automatically adjust window size when screen buffer decreases */
323 if (wwidth > swidth)
324 {
325 SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH, swidth, TRUE);
326 wwidth = swidth;
327 }
328 if (wheight > sheight)
329 {
330 SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT, sheight, TRUE);
331 wheight = sheight;
332 }
333 }
334
335 pConInfo->ci.ScreenBufferSize.X = (SHORT)swidth;
336 pConInfo->ci.ScreenBufferSize.Y = (SHORT)sheight;
337 pConInfo->ci.ConsoleSize.X = (SHORT)wwidth;
338 pConInfo->ci.ConsoleSize.Y = (SHORT)wheight;
339 GuiInfo->WindowOrigin.x = left;
340 GuiInfo->WindowOrigin.y = top;
341 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
342 }
343 break;
344 }
345
346 case WM_COMMAND:
347 {
348 switch (LOWORD(wParam))
349 {
350 case IDC_EDIT_SCREEN_BUFFER_WIDTH:
351 {
352 if (HIWORD(wParam) == EN_KILLFOCUS)
353 {
354 DWORD swidth, wwidth;
355
356 swidth = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, NULL, FALSE);
357 wwidth = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH , NULL, FALSE);
358
359 /* Be sure that the (new) screen buffer width is in the correct range */
360 swidth = min(max(swidth, 1), 0xFFFF);
361
362 /* Automatically adjust window size when screen buffer decreases */
363 if (wwidth > swidth)
364 {
365 wwidth = swidth;
366 SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH, wwidth, TRUE);
367 }
368
369 pConInfo->ci.ScreenBufferSize.X = (SHORT)swidth;
370 pConInfo->ci.ConsoleSize.X = (SHORT)wwidth;
371 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
372 }
373 break;
374 }
375
376 case IDC_EDIT_WINDOW_SIZE_WIDTH:
377 {
378 if (HIWORD(wParam) == EN_KILLFOCUS)
379 {
380 DWORD swidth, wwidth;
381
382 swidth = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, NULL, FALSE);
383 wwidth = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH , NULL, FALSE);
384
385 /* Automatically adjust screen buffer size when window size enlarges */
386 if (wwidth >= swidth)
387 {
388 swidth = wwidth;
389
390 /* Be sure that the (new) screen buffer width is in the correct range */
391 swidth = min(max(swidth, 1), 0xFFFF);
392
393 SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, swidth, TRUE);
394 }
395
396 pConInfo->ci.ScreenBufferSize.X = (SHORT)swidth;
397 pConInfo->ci.ConsoleSize.X = (SHORT)wwidth;
398 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
399 }
400 break;
401 }
402
403 case IDC_EDIT_SCREEN_BUFFER_HEIGHT:
404 {
405 if (HIWORD(wParam) == EN_KILLFOCUS)
406 {
407 DWORD sheight, wheight;
408
409 sheight = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, NULL, FALSE);
410 wheight = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT , NULL, FALSE);
411
412 /* Be sure that the (new) screen buffer width is in the correct range */
413 sheight = min(max(sheight, 1), 0xFFFF);
414
415 /* Automatically adjust window size when screen buffer decreases */
416 if (wheight > sheight)
417 {
418 wheight = sheight;
419 SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT, wheight, TRUE);
420 }
421
422 pConInfo->ci.ScreenBufferSize.Y = (SHORT)sheight;
423 pConInfo->ci.ConsoleSize.Y = (SHORT)wheight;
424 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
425 }
426 break;
427 }
428
429 case IDC_EDIT_WINDOW_SIZE_HEIGHT:
430 {
431 if (HIWORD(wParam) == EN_KILLFOCUS)
432 {
433 DWORD sheight, wheight;
434
435 sheight = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, NULL, FALSE);
436 wheight = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT , NULL, FALSE);
437
438 /* Automatically adjust screen buffer size when window size enlarges */
439 if (wheight >= sheight)
440 {
441 sheight = wheight;
442
443 /* Be sure that the (new) screen buffer width is in the correct range */
444 sheight = min(max(sheight, 1), 0xFFFF);
445
446 SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, sheight, TRUE);
447 }
448
449 pConInfo->ci.ScreenBufferSize.Y = (SHORT)sheight;
450 pConInfo->ci.ConsoleSize.Y = (SHORT)wheight;
451 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
452 }
453 break;
454 }
455
456 case IDC_EDIT_WINDOW_POS_LEFT:
457 case IDC_EDIT_WINDOW_POS_TOP:
458 {
459 if (HIWORD(wParam) == EN_KILLFOCUS)
460 {
461 DWORD left, top;
462
463 left = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, NULL, TRUE);
464 top = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP , NULL, TRUE);
465
466 GuiInfo->WindowOrigin.x = left;
467 GuiInfo->WindowOrigin.y = top;
468 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
469 }
470 break;
471 }
472
473 case IDC_CHECK_SYSTEM_POS_WINDOW:
474 {
475 LONG res = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0);
476 if (res == BST_CHECKED)
477 {
478 ULONG left, top;
479
480 left = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, NULL, TRUE);
481 top = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP , NULL, TRUE);
482
483 GuiInfo->AutoPosition = FALSE;
484 GuiInfo->WindowOrigin.x = left;
485 GuiInfo->WindowOrigin.y = top;
486 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
487
488 SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
489 EnableDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, TRUE);
490 EnableDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_TOP , TRUE);
491 EnableDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT, TRUE);
492 EnableDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP , TRUE);
493 }
494 else if (res == BST_UNCHECKED)
495 {
496 GuiInfo->AutoPosition = TRUE;
497 // Do not touch GuiInfo->WindowOrigin !!
498 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
499
500 SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
501 EnableDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, FALSE);
502 EnableDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_TOP , FALSE);
503 EnableDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT, FALSE);
504 EnableDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP , FALSE);
505 }
506 }
507 }
508 }
509
510 default:
511 break;
512 }
513
514 return FALSE;
515 }