Author: ekohl
Date: Tue Jan 30 02:35:31 2007
New Revision: 25661
URL:
http://svn.reactos.org/svn/reactos?rev=25661&view=rev
Log:
Change the size of caption and scrollbar in the preview window.
Modified:
trunk/reactos/dll/cpl/desk/Fr.rc
trunk/reactos/dll/cpl/desk/It.rc
trunk/reactos/dll/cpl/desk/Ja.rc
trunk/reactos/dll/cpl/desk/Ru.rc
trunk/reactos/dll/cpl/desk/Uk.rc
trunk/reactos/dll/cpl/desk/appearance.c
trunk/reactos/dll/cpl/desk/cz.rc
trunk/reactos/dll/cpl/desk/de.rc
trunk/reactos/dll/cpl/desk/en.rc
trunk/reactos/dll/cpl/desk/es.rc
trunk/reactos/dll/cpl/desk/gr.rc
trunk/reactos/dll/cpl/desk/hu.rc
trunk/reactos/dll/cpl/desk/nl.rc
trunk/reactos/dll/cpl/desk/pl.rc
trunk/reactos/dll/cpl/desk/preview.c
trunk/reactos/dll/cpl/desk/preview.h
trunk/reactos/dll/cpl/desk/resource.h
trunk/reactos/dll/cpl/desk/sv.rc
Modified: trunk/reactos/dll/cpl/desk/Fr.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/Fr.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/Fr.rc (original)
+++ trunk/reactos/dll/cpl/desk/Fr.rc Tue Jan 30 02:35:31 2007
@@ -62,6 +62,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/It.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/It.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/It.rc (original)
+++ trunk/reactos/dll/cpl/desk/It.rc Tue Jan 30 02:35:31 2007
@@ -55,6 +55,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/Ja.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/Ja.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/Ja.rc (original)
+++ trunk/reactos/dll/cpl/desk/Ja.rc Tue Jan 30 02:35:31 2007
@@ -59,6 +59,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 228
Modified: trunk/reactos/dll/cpl/desk/Ru.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/Ru.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/Ru.rc (original)
+++ trunk/reactos/dll/cpl/desk/Ru.rc Tue Jan 30 02:35:31 2007
@@ -58,6 +58,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/Uk.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/Uk.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/Uk.rc (original)
+++ trunk/reactos/dll/cpl/desk/Uk.rc Tue Jan 30 02:35:31 2007
@@ -63,6 +63,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/appearance.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/appearance.c?…
==============================================================================
--- trunk/reactos/dll/cpl/desk/appearance.c (original)
+++ trunk/reactos/dll/cpl/desk/appearance.c Tue Jan 30 02:35:31 2007
@@ -6,24 +6,102 @@
* PURPOSE: Appearance property page
*
* PROGRAMMERS: Trevor McCort (lycan359(a)gmail.com)
+ * Eric Kohl
*/
#include "desk.h"
+#include "preview.h"
+
+typedef struct _GLOBAL_DATA
+{
+ INT nItem;
+} GLOBAL_DATA, *PGLOBAL_DATA;
static VOID
-OnInitDialog(HWND hwndDlg)
+OnInitDialog(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
{
TCHAR szBuffer[256];
- UINT i;
+ UINT i, idx;
+ /* Set the item names */
for (i = IDS_ITEM_FIRST; i < IDS_ITEM_LAST; i++)
{
LoadString(hApplet, i, szBuffer, 256);
- SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_UI_ITEM, CB_ADDSTRING, 0,
(LPARAM)szBuffer);
+ idx = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_UI_ITEM, CB_ADDSTRING, 0,
(LPARAM)szBuffer);
+ if (idx != CB_ERR)
+ {
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_UI_ITEM, CB_SETITEMDATA,
(WPARAM)idx, (LPARAM)i - IDS_ITEM_FIRST);
+ }
}
- SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_UI_ITEM, CB_SETCURSEL, 2, 0);
+ pGlobalData->nItem = IDX_DESKTOP;
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_UI_ITEM, CB_SETCURSEL,
pGlobalData->nItem, 0);
+}
+
+
+static VOID
+OnItemChange(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
+{
+ INT nSelection, nIdx;
+
+ nIdx = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_UI_ITEM, CB_GETCURSEL, 0, 0);
+ if (nIdx == CB_ERR)
+ return;
+
+ nSelection = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_UI_ITEM, CB_GETITEMDATA,
(WPARAM)nIdx, 0);
+ if (nSelection == CB_ERR)
+ return;
+
+ pGlobalData->nItem = nSelection;
+
+ switch (nSelection)
+ {
+ case IDX_SCROLLBAR:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE_UPDOWN), TRUE);
+ SendDlgItemMessage(hwndDlg, IDC_APPEAR_SIZE_UPDOWN, UDM_SETPOS, 0,
+ (LPARAM)MAKELONG((short)SendDlgItemMessage(hwndDlg,
IDC_APPEARANCE_PREVIEW, PVM_GETCXSCROLLBAR, 0, 0), 0));
+ break;
+
+ case IDX_MENU:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE_UPDOWN), TRUE);
+ SendDlgItemMessage(hwndDlg, IDC_APPEAR_SIZE_UPDOWN, UDM_SETPOS, 0,
+ (LPARAM)MAKELONG((short)SendDlgItemMessage(hwndDlg,
IDC_APPEARANCE_PREVIEW, PVM_GETCYMENU, 0, 0), 0));
+ break;
+
+ case IDX_INACTIVE_BORDER:
+ case IDX_ACTIVE_BORDER:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE_UPDOWN), TRUE);
+ SendDlgItemMessage(hwndDlg, IDC_APPEAR_SIZE_UPDOWN, UDM_SETPOS, 0,
+ (LPARAM)MAKELONG((short)SendDlgItemMessage(hwndDlg,
IDC_APPEARANCE_PREVIEW, PVM_GETCYSIZEFRAME, 0, 0), 0));
+ break;
+
+ case IDX_INACTIVE_CAPTION:
+ case IDX_ACTIVE_CAPTION:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE_UPDOWN), TRUE);
+ SendDlgItemMessage(hwndDlg, IDC_APPEAR_SIZE_UPDOWN, UDM_SETPOS, 0,
+ (LPARAM)MAKELONG((short)SendDlgItemMessage(hwndDlg,
IDC_APPEARANCE_PREVIEW, PVM_GETCYCAPTION, 0, 0), 0));
+ break;
+
+ case IDX_CAPTION_BUTTON:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE_UPDOWN), TRUE);
+ SendDlgItemMessage(hwndDlg, IDC_APPEAR_SIZE_UPDOWN, UDM_SETPOS, 0,
+ (LPARAM)MAKELONG((short)SendDlgItemMessage(hwndDlg,
IDC_APPEARANCE_PREVIEW, PVM_GETCYCAPTION, 0, 0), 0));
+ break;
+
+ default:
+ SetDlgItemText(hwndDlg, IDC_APPEAR_SIZE, _T(""));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_APPEAR_SIZE_UPDOWN), FALSE);
+
+ break;
+ }
+
}
@@ -33,24 +111,76 @@
WPARAM wParam,
LPARAM lParam)
{
- UNREFERENCED_PARAMETER(lParam);
- UNREFERENCED_PARAMETER(wParam);
- UNREFERENCED_PARAMETER(hwndDlg);
+ PGLOBAL_DATA pGlobalData;
+
+ pGlobalData = (PGLOBAL_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
switch (uMsg)
{
case WM_INITDIALOG:
- OnInitDialog(hwndDlg);
+ pGlobalData = (PGLOBAL_DATA)HeapAlloc(GetProcessHeap(),
+ HEAP_ZERO_MEMORY,
+ sizeof(GLOBAL_DATA));
+ if (!pGlobalData)
+ return -1;
+
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
+ OnInitDialog(hwndDlg, pGlobalData);
+ OnItemChange(hwndDlg, pGlobalData);
break;
case WM_COMMAND:
+ switch (LOWORD(wParam))
+ {
+ case IDC_APPEARANCE_UI_ITEM:
+ if (HIWORD(wParam) == CBN_SELCHANGE)
+ {
+ OnItemChange(hwndDlg, pGlobalData);
+ }
+ break;
+
+ case IDC_APPEAR_SIZE:
+ if (pGlobalData && HIWORD(wParam) == EN_CHANGE)
+ {
+ int i = (int)LOWORD(SendDlgItemMessage(hwndDlg,
IDC_APPEAR_SIZE_UPDOWN, UDM_GETPOS,0,0L));
+
+ switch (pGlobalData->nItem)
+ {
+ case IDX_INACTIVE_CAPTION:
+ case IDX_ACTIVE_CAPTION:
+ case IDX_CAPTION_BUTTON:
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW,
PVM_SETCYCAPTION, 0, i);
+ break;
+
+ case IDX_MENU:
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW,
PVM_SETCYMENU, 0, i);
+ break;
+
+ case IDX_SCROLLBAR:
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW,
PVM_SETCXSCROLLBAR, 0, i);
+ break;
+
+ case IDX_INACTIVE_BORDER:
+ case IDX_ACTIVE_BORDER:
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW,
PVM_SETCYSIZEFRAME, 0, i);
+ break;
+ }
+ }
+ break;
+ }
+ break;
+
+ case WM_DESTROY:
+ HeapFree(GetProcessHeap(), 0, pGlobalData);
break;
case WM_USER:
SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_UI_ITEM, CB_SETCURSEL, lParam,
0);
+ OnItemChange(hwndDlg, pGlobalData);
break;
}
return FALSE;
}
+
Modified: trunk/reactos/dll/cpl/desk/cz.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/cz.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/cz.rc (original)
+++ trunk/reactos/dll/cpl/desk/cz.rc Tue Jan 30 02:35:31 2007
@@ -59,6 +59,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/de.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/de.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/de.rc (original)
+++ trunk/reactos/dll/cpl/desk/de.rc Tue Jan 30 02:35:31 2007
@@ -56,7 +56,12 @@
CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass",
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
- COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST | CBS_SORT
| WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 228
Modified: trunk/reactos/dll/cpl/desk/en.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/en.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/en.rc (original)
+++ trunk/reactos/dll/cpl/desk/en.rc Tue Jan 30 02:35:31 2007
@@ -55,6 +55,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/es.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/es.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/es.rc (original)
+++ trunk/reactos/dll/cpl/desk/es.rc Tue Jan 30 02:35:31 2007
@@ -66,6 +66,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/gr.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/gr.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/gr.rc (original)
+++ trunk/reactos/dll/cpl/desk/gr.rc Tue Jan 30 02:35:31 2007
@@ -59,6 +59,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/hu.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/hu.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/hu.rc (original)
+++ trunk/reactos/dll/cpl/desk/hu.rc Tue Jan 30 02:35:31 2007
@@ -51,6 +51,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/nl.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/nl.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/nl.rc (original)
+++ trunk/reactos/dll/cpl/desk/nl.rc Tue Jan 30 02:35:31 2007
@@ -59,6 +59,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/pl.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/pl.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/pl.rc (original)
+++ trunk/reactos/dll/cpl/desk/pl.rc Tue Jan 30 02:35:31 2007
@@ -60,6 +60,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/preview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/preview.c?rev…
==============================================================================
--- trunk/reactos/dll/cpl/desk/preview.c (original)
+++ trunk/reactos/dll/cpl/desk/preview.c Tue Jan 30 02:35:31 2007
@@ -1,5 +1,5 @@
/*
- * PROJECT: ReactOS Timedate Control Panel
+ * PROJECT: ReactOS Desktop Control Panel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: lib/cpl/desk/preview.c
* PURPOSE: Draws the preview control
@@ -32,7 +32,11 @@
INT cxEdge;
INT cyEdge;
+ INT cySizeFrame;
+
INT cyCaption;
+ INT cyMenu;
+ INT cxScrollbar;
RECT rcDesktop;
RECT rcInactiveFrame;
@@ -76,13 +80,13 @@
static VOID
-DrawCaptionButtons(HDC hdc, LPRECT lpRect, BOOL bMinMax)
+DrawCaptionButtons(HDC hdc, LPRECT lpRect, BOOL bMinMax, int x)
{
RECT rc3;
RECT rc4;
RECT rc5;
- rc3.left = lpRect->right - 2 - 16;
+ rc3.left = lpRect->right - 2 - x;
rc3.top = lpRect->top + 2;
rc3.right = lpRect->right - 2;
rc3.bottom = lpRect->bottom - 2;
@@ -91,21 +95,22 @@
if (bMinMax)
{
- rc4.left = rc3.left - 16 - 2;
+ rc4.left = rc3.left - x - 2;
rc4.top = rc3.top;
- rc4.right = rc3.right - 16 - 2;
+ rc4.right = rc3.right - x - 2;
rc4.bottom = rc3.bottom;
DrawFrameControl(hdc, &rc4, DFC_CAPTION, DFCS_CAPTIONMAX);
- rc5.left = rc4.left - 16;
+ rc5.left = rc4.left - x;
rc5.top = rc4.top;
- rc5.right = rc4.right - 16;
+ rc5.right = rc4.right - x;
rc5.bottom = rc4.bottom;
DrawFrameControl(hdc, &rc5, DFC_CAPTION, DFCS_CAPTIONMIN);
}
}
+
static VOID
DrawScrollbar(HDC hdc, LPRECT rc, HBRUSH hbrScrollbar)
@@ -160,7 +165,11 @@
pPreviewData->cxEdge = GetSystemMetrics(SM_CXEDGE);
pPreviewData->cyEdge = GetSystemMetrics(SM_CXEDGE);
- pPreviewData->cyCaption = 20; //GetSystemMetrics(SM_CYCAPTION);
+ pPreviewData->cySizeFrame = GetSystemMetrics(SM_CYSIZEFRAME);
+
+ pPreviewData->cyCaption = GetSystemMetrics(SM_CYCAPTION);
+ pPreviewData->cyMenu = GetSystemMetrics(SM_CYMENU);
+ pPreviewData->cxScrollbar = GetSystemMetrics(SM_CXVSCROLL);
/* load font info */
NonClientMetrics.cbSize = sizeof(NONCLIENTMETRICS);
@@ -196,104 +205,111 @@
static VOID
+CalculateItemSize(PPREVIEW_DATA pPreviewData)
+{
+ int width, height;
+
+ /* Calculate the inactive window rectangle */
+ pPreviewData->rcInactiveFrame.left = pPreviewData->rcDesktop.left + 8;
+ pPreviewData->rcInactiveFrame.top = pPreviewData->rcDesktop.top + 8;
+ pPreviewData->rcInactiveFrame.right = pPreviewData->rcDesktop.right - 25;
+ pPreviewData->rcInactiveFrame.bottom = pPreviewData->rcDesktop.bottom - 30;
+
+ /* Calculate the inactive caption rectangle */
+ pPreviewData->rcInactiveCaption.left = pPreviewData->rcInactiveFrame.left +
pPreviewData->cxEdge + 1/*3*/ + 1;
+ pPreviewData->rcInactiveCaption.top = pPreviewData->rcInactiveFrame.top +
pPreviewData->cyEdge + 1/*3*/ + 1;
+ pPreviewData->rcInactiveCaption.right = pPreviewData->rcInactiveFrame.right -
pPreviewData->cxEdge - 1/*3*/ - 1;
+ pPreviewData->rcInactiveCaption.bottom = pPreviewData->rcInactiveFrame.top +
pPreviewData->cyCaption + 1 + 2;
+
+ /* Calculate the inactive caption buttons rectangle */
+ pPreviewData->rcInactiveCaptionButtons.left =
pPreviewData->rcInactiveCaption.right - 2 - 2 - 3 * 16;
+ pPreviewData->rcInactiveCaptionButtons.top =
pPreviewData->rcInactiveCaption.top + 2;
+ pPreviewData->rcInactiveCaptionButtons.right =
pPreviewData->rcInactiveCaption.right - 2;
+ pPreviewData->rcInactiveCaptionButtons.bottom =
pPreviewData->rcInactiveCaption.bottom - 2;
+
+ /* Calculate the active window rectangle */
+ pPreviewData->rcActiveFrame.left = pPreviewData->rcInactiveFrame.left + 3 + 1;
+ pPreviewData->rcActiveFrame.top = pPreviewData->rcInactiveCaption.bottom + 1;
+ pPreviewData->rcActiveFrame.right = pPreviewData->rcDesktop.right - 10;
+ pPreviewData->rcActiveFrame.bottom = pPreviewData->rcDesktop.bottom - 25;
+
+ /* Calculate the active caption rectangle */
+ pPreviewData->rcActiveCaption.left = pPreviewData->rcActiveFrame.left + 3 + 1;
+ pPreviewData->rcActiveCaption.top = pPreviewData->rcActiveFrame.top + 3 + 1;
+ pPreviewData->rcActiveCaption.right = pPreviewData->rcActiveFrame.right - 3 -
1;
+ pPreviewData->rcActiveCaption.bottom = pPreviewData->rcActiveFrame.top +
pPreviewData->cyCaption + 1 + 2;
+
+ /* Calculate the active caption buttons rectangle */
+ pPreviewData->rcActiveCaptionButtons.left = pPreviewData->rcActiveCaption.right
- 2 - 2 - 3 * 16;
+ pPreviewData->rcActiveCaptionButtons.top = pPreviewData->rcActiveCaption.top +
2;
+ pPreviewData->rcActiveCaptionButtons.right =
pPreviewData->rcActiveCaption.right - 2;
+ pPreviewData->rcActiveCaptionButtons.bottom =
pPreviewData->rcActiveCaption.bottom - 2;
+
+ /* Calculate the active menu bar rectangle */
+ pPreviewData->rcActiveMenuBar.left = pPreviewData->rcActiveFrame.left + 3 + 1;
+ pPreviewData->rcActiveMenuBar.top = pPreviewData->rcActiveCaption.bottom + 1;
+ pPreviewData->rcActiveMenuBar.right = pPreviewData->rcActiveFrame.right - 3 -
1;
+ pPreviewData->rcActiveMenuBar.bottom = pPreviewData->rcActiveMenuBar.top +
pPreviewData->cyMenu + 1;
+
+ /* Calculate the active client rectangle */
+ pPreviewData->rcActiveClient.left = pPreviewData->rcActiveFrame.left + 3 + 1;
+ pPreviewData->rcActiveClient.top = pPreviewData->rcActiveMenuBar.bottom; // +
1;
+ pPreviewData->rcActiveClient.right = pPreviewData->rcActiveFrame.right - 3 -
1;
+ pPreviewData->rcActiveClient.bottom = pPreviewData->rcActiveFrame.bottom - 3 -
1;
+
+ /* Calculate the active scroll rectangle */
+ pPreviewData->rcActiveScroll.left = pPreviewData->rcActiveClient.right - 2 -
pPreviewData->cxScrollbar;
+ pPreviewData->rcActiveScroll.top = pPreviewData->rcActiveClient.top + 2;
+ pPreviewData->rcActiveScroll.right = pPreviewData->rcActiveClient.right - 2;
+ pPreviewData->rcActiveScroll.bottom = pPreviewData->rcActiveClient.bottom - 2;
+
+
+ /* Dialog window */
+ pPreviewData->rcDialogFrame.left = pPreviewData->rcActiveClient.left + 4;
+ pPreviewData->rcDialogFrame.top = (pPreviewData->rcDesktop.bottom * 60) / 100;
+ pPreviewData->rcDialogFrame.right = (pPreviewData->rcDesktop.right * 65) /
100;
+ pPreviewData->rcDialogFrame.bottom = pPreviewData->rcDesktop.bottom - 5;
+
+ /* Calculate the dialog caption rectangle */
+ pPreviewData->rcDialogCaption.left = pPreviewData->rcDialogFrame.left + 3;
+ pPreviewData->rcDialogCaption.top = pPreviewData->rcDialogFrame.top + 3;
+ pPreviewData->rcDialogCaption.right = pPreviewData->rcDialogFrame.right - 3;
+ pPreviewData->rcDialogCaption.bottom = pPreviewData->rcDialogFrame.top +
pPreviewData->cyCaption + 1 + 1;
+
+ /* Calculate the inactive caption buttons rectangle */
+ pPreviewData->rcDialogCaptionButtons.left = pPreviewData->rcDialogCaption.right
- 2 - 16;
+ pPreviewData->rcDialogCaptionButtons.top = pPreviewData->rcDialogCaption.top +
2;
+ pPreviewData->rcDialogCaptionButtons.right =
pPreviewData->rcDialogCaption.right - 2;
+ pPreviewData->rcDialogCaptionButtons.bottom =
pPreviewData->rcDialogCaption.bottom - 2;
+
+ /* Calculate the dialog client rectangle */
+ pPreviewData->rcDialogClient.left = pPreviewData->rcDialogFrame.left + 3;
+ pPreviewData->rcDialogClient.top = pPreviewData->rcDialogCaption.bottom + 1;
+ pPreviewData->rcDialogClient.right = pPreviewData->rcDialogFrame.right - 3;
+ pPreviewData->rcDialogClient.bottom = pPreviewData->rcDialogFrame.bottom - 3;
+
+ /* Calculate the dialog button rectangle */
+ width = 80;
+ height = 28;
+
+ pPreviewData->rcDialogButton.left =
+ (pPreviewData->rcDialogClient.right + pPreviewData->rcDialogClient.left -
width) / 2;
+ pPreviewData->rcDialogButton.right = pPreviewData->rcDialogButton.left +
width;
+ pPreviewData->rcDialogButton.bottom = pPreviewData->rcDialogClient.bottom - 2;
+ pPreviewData->rcDialogButton.top = pPreviewData->rcDialogButton.bottom -
height;
+}
+
+
+static VOID
OnSize(INT cx, INT cy, PPREVIEW_DATA pPreviewData)
{
- int width, height;
-
/* Get Desktop rectangle */
pPreviewData->rcDesktop.left = 0;
pPreviewData->rcDesktop.top = 0;
pPreviewData->rcDesktop.right = cx;
pPreviewData->rcDesktop.bottom = cy;
- /* Calculate the inactive window rectangle */
- pPreviewData->rcInactiveFrame.left = pPreviewData->rcDesktop.left + 8;
- pPreviewData->rcInactiveFrame.top = pPreviewData->rcDesktop.top + 8;
- pPreviewData->rcInactiveFrame.right = pPreviewData->rcDesktop.right - 25;
- pPreviewData->rcInactiveFrame.bottom = pPreviewData->rcDesktop.bottom - 30;
-
- /* Calculate the inactive caption rectangle */
- pPreviewData->rcInactiveCaption.left = pPreviewData->rcInactiveFrame.left +
pPreviewData->cxEdge + 1/*3*/ + 1;
- pPreviewData->rcInactiveCaption.top = pPreviewData->rcInactiveFrame.top +
pPreviewData->cyEdge + 1/*3*/ + 1;
- pPreviewData->rcInactiveCaption.right = pPreviewData->rcInactiveFrame.right -
pPreviewData->cxEdge - 1/*3*/ - 1;
- pPreviewData->rcInactiveCaption.bottom = pPreviewData->rcInactiveFrame.top +
pPreviewData->cyCaption /*20*/ + 2;
-
- /* Calculate the inactive caption buttons rectangle */
- pPreviewData->rcInactiveCaptionButtons.left =
pPreviewData->rcInactiveCaption.right - 2 - 2 - 3 * 16;
- pPreviewData->rcInactiveCaptionButtons.top =
pPreviewData->rcInactiveCaption.top + 2;
- pPreviewData->rcInactiveCaptionButtons.right =
pPreviewData->rcInactiveCaption.right - 2;
- pPreviewData->rcInactiveCaptionButtons.bottom =
pPreviewData->rcInactiveCaption.bottom - 2;
-
- /* Calculate the active window rectangle */
- pPreviewData->rcActiveFrame.left = pPreviewData->rcInactiveFrame.left + 3 + 1;
- pPreviewData->rcActiveFrame.top = pPreviewData->rcInactiveCaption.bottom + 1;
- pPreviewData->rcActiveFrame.right = pPreviewData->rcDesktop.right - 10;
- pPreviewData->rcActiveFrame.bottom = pPreviewData->rcDesktop.bottom - 25;
-
- /* Calculate the active caption rectangle */
- pPreviewData->rcActiveCaption.left = pPreviewData->rcActiveFrame.left + 3 + 1;
- pPreviewData->rcActiveCaption.top = pPreviewData->rcActiveFrame.top + 3 + 1;
- pPreviewData->rcActiveCaption.right = pPreviewData->rcActiveFrame.right - 3 -
1;
- pPreviewData->rcActiveCaption.bottom = pPreviewData->rcActiveFrame.top +
pPreviewData->cyCaption/*20*/ + 2;
-
- /* Calculate the active caption buttons rectangle */
- pPreviewData->rcActiveCaptionButtons.left = pPreviewData->rcActiveCaption.right
- 2 - 2 - 3 * 16;
- pPreviewData->rcActiveCaptionButtons.top = pPreviewData->rcActiveCaption.top +
2;
- pPreviewData->rcActiveCaptionButtons.right =
pPreviewData->rcActiveCaption.right - 2;
- pPreviewData->rcActiveCaptionButtons.bottom =
pPreviewData->rcActiveCaption.bottom - 2;
-
- /* Calculate the active menu bar rectangle */
- pPreviewData->rcActiveMenuBar.left = pPreviewData->rcActiveFrame.left + 3 + 1;
- pPreviewData->rcActiveMenuBar.top = pPreviewData->rcActiveCaption.bottom + 1;
- pPreviewData->rcActiveMenuBar.right = pPreviewData->rcActiveFrame.right - 3 -
1;
- pPreviewData->rcActiveMenuBar.bottom = pPreviewData->rcActiveMenuBar.top + 20;
-
- /* Calculate the active client rectangle */
- pPreviewData->rcActiveClient.left = pPreviewData->rcActiveFrame.left + 3 + 1;
- pPreviewData->rcActiveClient.top = pPreviewData->rcActiveMenuBar.bottom; // +
1;
- pPreviewData->rcActiveClient.right = pPreviewData->rcActiveFrame.right - 3 -
1;
- pPreviewData->rcActiveClient.bottom = pPreviewData->rcActiveFrame.bottom - 3 -
1;
-
- /* Calculate the active scroll rectangle */
- pPreviewData->rcActiveScroll.left = pPreviewData->rcActiveClient.right - 2 -
16;
- pPreviewData->rcActiveScroll.top = pPreviewData->rcActiveClient.top + 2;
- pPreviewData->rcActiveScroll.right = pPreviewData->rcActiveClient.right - 2;
- pPreviewData->rcActiveScroll.bottom = pPreviewData->rcActiveClient.bottom - 2;
-
-
- /* Dialog window */
- pPreviewData->rcDialogFrame.left = pPreviewData->rcActiveClient.left + 4;
- pPreviewData->rcDialogFrame.top = (pPreviewData->rcDesktop.bottom * 60) / 100;
- pPreviewData->rcDialogFrame.right = (pPreviewData->rcDesktop.right * 65) /
100;
- pPreviewData->rcDialogFrame.bottom = pPreviewData->rcDesktop.bottom - 5;
-
- /* Calculate the dialog caption rectangle */
- pPreviewData->rcDialogCaption.left = pPreviewData->rcDialogFrame.left + 3;
- pPreviewData->rcDialogCaption.top = pPreviewData->rcDialogFrame.top + 3;
- pPreviewData->rcDialogCaption.right = pPreviewData->rcDialogFrame.right - 3;
- pPreviewData->rcDialogCaption.bottom = pPreviewData->rcDialogFrame.top + 20 +
1;
-
- /* Calculate the inactive caption buttons rectangle */
- pPreviewData->rcDialogCaptionButtons.left = pPreviewData->rcDialogCaption.right
- 2 - 16;
- pPreviewData->rcDialogCaptionButtons.top = pPreviewData->rcDialogCaption.top +
2;
- pPreviewData->rcDialogCaptionButtons.right =
pPreviewData->rcDialogCaption.right - 2;
- pPreviewData->rcDialogCaptionButtons.bottom =
pPreviewData->rcDialogCaption.bottom - 2;
-
- /* Calculate the dialog client rectangle */
- pPreviewData->rcDialogClient.left = pPreviewData->rcDialogFrame.left + 3;
- pPreviewData->rcDialogClient.top = pPreviewData->rcDialogCaption.bottom + 1;
- pPreviewData->rcDialogClient.right = pPreviewData->rcDialogFrame.right - 3;
- pPreviewData->rcDialogClient.bottom = pPreviewData->rcDialogFrame.bottom - 3;
-
- /* Calculate the dialog button rectangle */
- width = 80;
- height = 28;
-
- pPreviewData->rcDialogButton.left =
- (pPreviewData->rcDialogClient.right + pPreviewData->rcDialogClient.left -
width) / 2;
- pPreviewData->rcDialogButton.right = pPreviewData->rcDialogButton.left +
width;
- pPreviewData->rcDialogButton.bottom = pPreviewData->rcDialogClient.bottom - 2;
- pPreviewData->rcDialogButton.top = pPreviewData->rcDialogButton.bottom -
height;
+ CalculateItemSize(pPreviewData);
}
@@ -315,14 +331,14 @@
SetTextColor(hdc, pPreviewData->clrInactiveCaptionText);
DrawCaptionTemp(NULL, hdc, &pPreviewData->rcInactiveCaption,
pPreviewData->hCaptionFont,
NULL, pPreviewData->lpInAct, DC_GRADIENT | DC_ICON | DC_TEXT);
- DrawCaptionButtons(hdc, &pPreviewData->rcInactiveCaption, TRUE);
+ DrawCaptionButtons(hdc, &pPreviewData->rcInactiveCaption, TRUE,
pPreviewData->cyCaption - 2);
/* Active Window */
DrawEdge(hdc, &pPreviewData->rcActiveFrame, EDGE_RAISED, BF_RECT |
BF_MIDDLE);
SetTextColor(hdc, pPreviewData->clrActiveCaptionText);
DrawCaptionTemp(NULL, hdc, &pPreviewData->rcActiveCaption,
pPreviewData->hCaptionFont,
NULL, pPreviewData->lpAct, DC_ACTIVE | DC_GRADIENT | DC_ICON |
DC_TEXT);
- DrawCaptionButtons(hdc, &pPreviewData->rcActiveCaption, TRUE);
+ DrawCaptionButtons(hdc, &pPreviewData->rcActiveCaption, TRUE,
pPreviewData->cyCaption - 2);
/* FIXME: Draw the menu bar */
DrawMenuBarTemp(hwnd, hdc, &pPreviewData->rcActiveMenuBar,
@@ -351,7 +367,7 @@
SetTextColor(hdc, pPreviewData->clrActiveCaptionText);
DrawCaptionTemp(NULL, hdc, &pPreviewData->rcDialogCaption,
pPreviewData->hCaptionFont,
NULL, pPreviewData->lpMessBox, DC_ACTIVE | DC_GRADIENT | DC_ICON |
DC_TEXT);
- DrawCaptionButtons(hdc, &pPreviewData->rcDialogCaption, FALSE);
+ DrawCaptionButtons(hdc, &pPreviewData->rcDialogCaption, FALSE,
pPreviewData->cyCaption - 2);
/* Draw the dialog text */
CopyRect(&rc, &pPreviewData->rcDialogClient);
@@ -491,6 +507,54 @@
HeapFree(GetProcessHeap(), 0, pPreviewData);
break;
+ case PVM_GETCYCAPTION:
+ return pPreviewData->cyCaption;
+
+ case PVM_SETCYCAPTION:
+ if ((INT)lParam > 0)
+ {
+ pPreviewData->cyCaption = (INT)lParam;
+ CalculateItemSize(pPreviewData);
+ InvalidateRect(hwnd, NULL, FALSE);
+ }
+ break;
+
+ case PVM_GETCYMENU:
+ return pPreviewData->cyMenu;
+
+ case PVM_SETCYMENU:
+ if ((INT)lParam > 0)
+ {
+ pPreviewData->cyMenu = (INT)lParam;
+ CalculateItemSize(pPreviewData);
+ InvalidateRect(hwnd, NULL, FALSE);
+ }
+ break;
+
+ case PVM_GETCXSCROLLBAR:
+ return pPreviewData->cxScrollbar;
+
+ case PVM_SETCXSCROLLBAR:
+ if ((INT)lParam > 0)
+ {
+ pPreviewData->cxScrollbar = (INT)lParam;
+ CalculateItemSize(pPreviewData);
+ InvalidateRect(hwnd, NULL, FALSE);
+ }
+ break;
+
+ case PVM_GETCYSIZEFRAME:
+ return pPreviewData->cySizeFrame;
+
+ case PVM_SETCYSIZEFRAME:
+ if ((INT)lParam > 0)
+ {
+ pPreviewData->cySizeFrame = (INT)lParam;
+ CalculateItemSize(pPreviewData);
+ InvalidateRect(hwnd, NULL, FALSE);
+ }
+ break;
+
default:
DefWindowProc(hwnd,
uMsg,
Modified: trunk/reactos/dll/cpl/desk/preview.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/preview.h?rev…
==============================================================================
--- trunk/reactos/dll/cpl/desk/preview.h (original)
+++ trunk/reactos/dll/cpl/desk/preview.h Tue Jan 30 02:35:31 2007
@@ -1,3 +1,10 @@
+/*
+ * PROJECT: ReactOS Desktop Control Panel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: lib/cpl/desk/preview.h
+ * PURPOSE: Definitions used by the preview control
+ * COPYRIGHT: Copyright 2006, 2007 Eric Kohl
+ */
#define IDX_3D_OBJECTS 0
#define IDX_SCROLLBAR 1
@@ -17,5 +24,17 @@
#define IDX_CAPTION_BUTTON 17
+#define PVM_GETCYCAPTION (WM_USER+1)
+#define PVM_SETCYCAPTION (WM_USER+2)
+
+#define PVM_GETCYMENU (WM_USER+3)
+#define PVM_SETCYMENU (WM_USER+4)
+
+#define PVM_GETCXSCROLLBAR (WM_USER+5)
+#define PVM_SETCXSCROLLBAR (WM_USER+6)
+
+#define PVM_GETCYSIZEFRAME (WM_USER+7)
+#define PVM_SETCYSIZEFRAME (WM_USER+8)
+
BOOL RegisterPreviewControl(IN HINSTANCE hInstance);
VOID UnregisterPreviewControl(IN HINSTANCE hInstance);
Modified: trunk/reactos/dll/cpl/desk/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/resource.h?re…
==============================================================================
--- trunk/reactos/dll/cpl/desk/resource.h (original)
+++ trunk/reactos/dll/cpl/desk/resource.h Tue Jan 30 02:35:31 2007
@@ -84,8 +84,14 @@
/* Appearance Page */
-#define IDC_APPEARANCE_PREVIEW 1500
-#define IDC_APPEARANCE_UI_ITEM 1501
+#define IDC_APPEARANCE_PREVIEW 1500
+#define IDC_APPEARANCE_UI_ITEM 1501
+
+#define IDC_APPEAR_SIZE 1502
+#define IDC_APPEAR_SIZE_UPDOWN 1503
+
+#define IDC_APPEAR_FONT_NAME 1510
+
#define IDS_INACTWIN 1510
#define IDS_ACTWIN 1511
@@ -120,3 +126,4 @@
#endif /* __CPL_DESK_RESOURCE_H__ */
+
Modified: trunk/reactos/dll/cpl/desk/sv.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/sv.rc?rev=256…
==============================================================================
--- trunk/reactos/dll/cpl/desk/sv.rc (original)
+++ trunk/reactos/dll/cpl/desk/sv.rc Tue Jan 30 02:35:31 2007
@@ -62,6 +62,11 @@
WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9
COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
+ LTEXT "Size:", IDC_STATIC, 142, 159, 16, 9
+ EDITTEXT IDC_APPEAR_SIZE, 142, 169, 38, 13, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_APPEAR_SIZE_UPDOWN, UPDOWN_CLASS, WS_BORDER |
WS_GROUP |
+ UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT,
+ 172, 169, 10, 13
END
IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188