in Migration and Interoperability/Win32HostingWPFPage/cpp/win32hostingwpfpage.cpp [367:592]
void CreateRadioButtons(HWND hWnd)
{
//Background color
int top = 25;
controlDisplayLabel = CreateWindowEx(0, L"static", L"ControlProperties",
WS_CHILD | WS_VISIBLE | SS_LEFT,
10, top,
125, 25,
hWnd,
NULL,
hInst,
NULL);
//Background radio buttons
top += 35;
backgroundGroup = CreateWindowEx(0, L"button", L"Background Color",
WS_CHILD | WS_VISIBLE | BS_GROUPBOX,
10, top,
175, 100,
hWnd,
(HMENU) IDC_ORIGINALBACKGROUND,
hInst,
NULL);
top += 20;
originalBackgroundButton = CreateWindowEx(0, L"button", L"Original",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_ORIGINALBACKGROUND,
hInst,
NULL);
top += 20;
lightGreenBackgroundButton = CreateWindowEx(0, L"button", L"Light Green",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_LIGHTGREENBACKGROUND,
hInst,
NULL);
top += 20;
lightSalmonBackgroundButton = CreateWindowEx(0, L"button", L"Light Salmon",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_LIGHTSALMONBACKGROUND,
hInst,
NULL);
//Foreground color
top += 45;
foregroundGroup = CreateWindowEx(0, L"button", L"Foreground Color",
WS_CHILD | WS_VISIBLE | BS_GROUPBOX,
10, top,
175, 100,
hWnd,
NULL,
hInst,
NULL);
top += 20;
originalForegroundButton = CreateWindowEx(0, L"button", L"Original",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_ORIGINALFOREGROUND,
hInst,
NULL);
top += 20;
redForegroundButton = CreateWindowEx(0, L"button", L"Red",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_REDFOREGROUND,
hInst,
NULL);
top += 20;
yellowForegroundButton = CreateWindowEx(0, L"button", L"Yellow",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_YELLOWFOREGROUND,
hInst,
NULL);
//Font family
top += 45;
fontFamilyGroup = CreateWindowEx(0, L"button", L"Font Family",
WS_CHILD | WS_VISIBLE | BS_GROUPBOX,
10, top,
175, 100,
hWnd,
NULL,
hInst,
NULL);
top += 20;
originalFontFamily = CreateWindowEx(0, L"button", L"Original",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_ORIGINALFONTFAMILY,
hInst,
NULL);
top += 20;
timesFontFamily = CreateWindowEx(0, L"button", L"Times New Roman",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
140, 25,
hWnd,
(HMENU) IDC_TIMESNEWROMAN,
hInst,
NULL);
top += 20;
wingdingsFontFamily = CreateWindowEx(0, L"button", L"WingDings",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_WINGDINGS,
hInst,
NULL);
//Font size
top += 45;
fontSizeGroup = CreateWindowEx(0, L"button", L"Font Size",
WS_CHILD | WS_VISIBLE | BS_GROUPBOX,
10, top,
175, 100,
hWnd,
NULL,
hInst,
NULL);
top += 20;
originalFontSize = CreateWindowEx(0, L"button", L"Original",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_ORIGINALFONTSIZE,
hInst,
NULL);
top += 20;
tenpointFontSize = CreateWindowEx(0, L"button", L"10",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_TENPOINT,
hInst,
NULL);
top += 20;
twelvepointFontSize = CreateWindowEx(0, L"button", L"12",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_TWELVEPOINT,
hInst,
NULL);
//Font style
top += 45;
fontStyleGroup = CreateWindowEx(0, L"button", L"Font Style",
WS_CHILD | WS_VISIBLE | BS_GROUPBOX,
10, top,
175, 70,
hWnd,
NULL,
hInst,
NULL);
top += 20;
originalFontStyle = CreateWindowEx(0, L"button", L"Original",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_ORIGINALFONTSTYLE,
hInst,
NULL);
top += 20;
italicFontStyle = CreateWindowEx(0, L"button", L"Italic",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_ITALIC,
hInst,
NULL);
//Font weight
top += 45;
fontWeightGroup = CreateWindowEx(0, L"button", L"Font Weight",
WS_CHILD | WS_VISIBLE | BS_GROUPBOX,
10, top,
175, 70,
hWnd,
NULL,
hInst,
NULL);
top += 20;
originalFontWeight = CreateWindowEx(0, L"button", L"Original",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_ORIGINALFONTWEIGHT,
hInst,
NULL);
top += 20;
boldFontWeight = CreateWindowEx(0, L"button", L"Bold",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
15, top,
125, 25,
hWnd,
(HMENU) IDC_BOLD,
hInst,
NULL);
}