Hide

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

Display
Print

Creating a Dialog Resource with Visual C++

This section describes how to add a Print Preview control to a dialog using Visual C++ 6.0 and Visual Studio (20xx).

Adding a Print Preview Control to a Dialog

To add a SftPrintPreview/DLL control to a dialog, use the "Custom Control" toolbar button. Click on the button and then the dialog being designed to add a control.

Visual C++ 6.0

Visual Studio .NET through Visual Studio 2015

Once a custom control has been added to a dialog, you can edit the control properties by using the View, Properties... menu command.

Visual C++ 6.0

Visual Studio .NET through Visual Studio 2015

To define a SftPrintPreview/DLL control, enter the class SftPrintPreviewControl10 in the edit field labeled Class. A window caption is not necessary, so the edit field marked Caption can be left blank.

SftPrintPreview/DLL Control Styles

To enter a SftPrintPreview/DLL window style in the User Control Properties dialog, use the following list to add the desired style values and enter the resulting hexadecimal value in the field marked Style. The Print Preview control does not offer any custom window styles, so only the standard window styles (such as WS_BORDER, WS_TABSTOP, etc.) are available.

StyleValueDescription
WS_BORDER0x00800000Draws a border around the control. The border is a dark line.
WS_CHILD0x40000000Creates a child window. Usually required.
WS_DISABLED0x08000000Creates a control that is initially disabled. A disabled control cannot receive input from the user.
WS_GROUP0x00020000Specifies the first control of a group of controls. All controls defined with the WS_GROUP style after the first control belong to the same group. The next control with the WS_GROUP style ends the group and starts the next group.
WS_TABSTOP0x00010000Specifies a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style.
WS_VISIBLE0x10000000Creates a control that is initially visible. Usually required.

The control can be customized using run-time code, mainly using the SetControlInfo function.

Test Mode

In the dialog test mode offered by Visual C++, the SftPrintPreview/DLL control will not be displayed. Instead, a gray box will show the location of the control. When using the tab key to test the tab stops, the simulated SftPrintPreview/DLL control will not receive the input focus and appear not to have a tab stop defined.


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