cwbNL_LoadDialogStrings

Purpose

This routine will control the replacement of translatable text within a dialog box. This includes dialog control text as well as the dialog-box caption.

Syntax

 
unsigned int CWB_ENTRY cwbNL_LoadDialogStrings(
                             HINSTANCE   MRIHandle,
                             HWND        windowHandle,
							               int		     nCaptionID,
                             USHORT      menuID,
                             HINSTANCE   menuLibHandle,
                             cwb_Boolean growAllControls);

Parameters

HINSTANCE MRIHandle - input
Handle of the module containing the strings for the dialog.
HWND windowHandle - input
Window handle of the dialog box.
int nCaptionID - input
ID of the caption string for the dialog box
USHORT menuID - input
ID of the menu for the dialog box.
HINSTANCE menuLibHandle - input
Handle of the module containing the menu for the dialog.
cwb_Boolean growAllControls - input
CWB_TRUE = All controls will be resized by the growthFactor CWB_FALSE = Only controls with text will be resized.

Return Codes

The following list shows common return values.

CWB_OK
Successful Completion.
CWBNL_DLG_MENU_LOAD_ERROR
Could not load the menu.
CWBNL_DLG_INVALID_HANDLE
Incorrect MRIHandle.

Usage

This process begins by enumerating, replacing the text of, and horizontally adjusting, all dialog controls within the dialog box, and finally right-adjusting the dialog box itself, relative to the adjusted controls therein. These adjustments are made only if the current window extents do not fully encompass the expansion space required for the text or all controls. After all of the text substitution has been completed, if a menu ID has been passed, it will be loaded and attached to the dialog box. It is suggested that this routine is called for every dialog-box procedure as the first thing done during the INITDLG message processing.