Hide

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

Display
Print

RegisterApp Function

The RegisterApp function registers the calling application for use of SftPrintPreview/DLL controls.

C

BOOL SftPrintPreview_RegisterApp(HINSTANCE hInst);

C++

static BOOL CSftPrintPreview::RegisterApp();

Parameters

hInst

The instance handle of the application, which will use SftPrintPreview/DLL controls.

Returns

The return value is TRUE if SftPrintPreview/DLL has been initialized for this application, otherwise FALSE is returned.

Comments

The RegisterApp function registers the calling application for use of SftPrintPreview/DLL controls.

This function allows SftPrintPreview/DLL to register all required window classes for the calling application. This call has to be made before any SftPrintPreview/DLL controls can be created.

An application should call UnregisterApp once the application no longer uses SftPrintPreview/DLL controls.

The call to this function should be made during application initialization.

Example

C

int PASCAL WinMain(HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR Cmd, int cmdShow)
{
    SftPrintPreview_RegisterApp(hinst); // Register application
    .... application message loop
    SftPrintPreview_UnregisterApp(hinst); // Unregister application
    return msg.wParam;
}

C++

BOOL CSampleApp::InitInstance() // based on CWinApp
{
    CSftPrintPreview::RegisterApp(); // Register to use SftPrintPreview/DLL
    .... other initialization
    return TRUE;
}

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


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