Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

RegisterApp

Registers an application with SftTree/DLL.

C

BOOL WINAPI SftTree_RegisterApp(HINSTANCE hInst);

C++

static BOOL CSftTree::RegisterApp();

Parameters

hInst

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

Returns

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

Comments

The RegisterApp function registers an application with SftTree/DLL.

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

If an application has multiple threads which create controls, each thread must also call RegisterApp to initialize support for SftTree/DLL. If only the main thread of a process creates controls (even if other threads communicate with the control), no additional calls to RegisterApp are required.

An application should call UnregisterApp once the application no longer uses SftTree/DLL controls. In addition, each thread that called RegisterApp during initialization must call UnregisterApp before the thread terminates.

Examples

C

        cls.lpfnWndProc     = (WNDPROC) SDI_WndProc;
        cls.style           = CS_DBLCLKS;
        cls.cbWndExtra      = 0;
        cls.cbClsExtra      = 0;
        if (!RegisterClass(&cls))
            return 0;
    }

    SftTree_RegisterApp(hinst);   /* Register with SftTree/DLL */

    // Initialize, run, and terminate the application
    hwndMain = CreateWindowEx(
            0L,
            TEXT("SoftelSampleFrame"),
            TEXT("Softel vdm, Inc. - Pictures Sample"),
            WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,

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