Hide

SftPrintPreview/DLL 2.0 - Print Preview Control for C/C++

Display
Print

SetCtlColors Function

The SetCtlColors function defines the Print Preview control's color attributes.

C

void SftPrintPreview_SetCtlColors(HWND hwnd, LPCSFTPRINTPREVIEW_COLORS lpColors);

C++

void CSftPrintPreview::SetCtlColors(LPCSFTPRINTPREVIEW_COLORS lpColors);

Parameters

hwnd

The window handle of the Print Preview control.

lpColors

A pointer to a SFTPRINTPREVIEW_COLORS structure defining the new color settings. The original contents should be retrieved using the GetCtlColors function.

Comments

The SetCtlColors function defines the Print Preview control's color attributes.

When using Windows themes, the colors are determined by the defined theme and some of the defined colors are ignored (see SFTPRINTPREVIEW_COLORS for more information).

Example

C

SFTPRINTPREVIEW_COLORS Colors;
SftPrintPreview_GetCtlColors(m_hwndPreview, &Colors);
Colors.colorPaper = RGB(255,255,255);
Colors.colorShadow = COLOR_BTNSHADOW | 0x80000000L;
SftPrintPreview_SetCtlColors(m_hwndPreview, &Colors);

C++

SFTPRINTPREVIEW_COLORS Colors;
m_Preview.GetCtlColors(&Colors);
Colors.colorPaper = RGB(255,255,255);
Colors.colorShadow = COLOR_BTNSHADOW | 0x80000000L;
m_Preview.SetCtlColors(&Colors);

See Also C/C++ API | C++ Classes | Notifications


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.