Jump to content

CcInitialize

From EDM2
Revision as of 03:05, 5 November 2025 by Martini (talk | contribs) (Created page with "This function creates a captioning window and returns the handle of that window to the application. This caption window is a child of hwndParent, and does not become visible until the Caption DLL is sent a CC_START command. An application calls this function once, during its initialization (or before it wants to use the caption services). ==Syntax== ccInitialize(hwndParent) ==Parameters== ;hwndParent (HWND) - input :Parent window handle. ==Returns== ;rc (ULONG) - r...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function creates a captioning window and returns the handle of that window to the application. This caption window is a child of hwndParent, and does not become visible until the Caption DLL is sent a CC_START command.

An application calls this function once, during its initialization (or before it wants to use the caption services).

Syntax

ccInitialize(hwndParent)

Parameters

hwndParent (HWND) - input
Parent window handle.

Returns

rc (ULONG) - returns
If the function is successful, the caption window handle is returned. Possible return code inidicating type of failure:
CCERR_INVALID_WINDOW_HANDLE
The window handle passed was not valid.

Example Code

Declaration:

#include <os2.h>

HWND     hwndParent;
ULONG    rc;

rc = ccInitialize(hwndParent);

Use sample:

 /*
    * Create the caption window and save the handle for further use.
    */
   hwndCaption = ccInitialize ( (HWND) hwndMainDialogBox );

Related Functions