Back to Devexpress

cxGetResourceString(TcxResourceStringID) Method

vcl-dxcore-dot-cxgetresourcestring-x28-6b9289a4-x29.md

latest1.8 KB
Original Source

cxGetResourceString(TcxResourceStringID) Method

Retrieves a resource string value for the specified resource identifier.

Declaration

delphi
function cxGetResourceString(AResString: TcxResourceStringID): string;

Parameters

NameTypeDescription
AResStringTcxResourceStringID

A pointer to the source resource string identifier.

|

Returns

TypeDescription
string

The resource string value.

|

Remarks

String constants for DevExpress products are stored as resources. DevExpress controls call the cxGetResourceString function to retrieve strings for each UI element with a caption or label.

To localize an application, you can call the cxSetResourceString procedure to substitute resource string values at runtime.

Code Example: Localize a Resource String

The following code example specifies a new value for the cxSDatePopupClear resource string in German:

delphi
uses
  dxCore; // Declares the cxSetResourceString global procedure
// ...

  cxSetResourceString(@cxSDatePopupClear, 'Löschen');
cpp
#include "dxCore.hpp" // Declares the cxSetResourceString global procedure
// ...

  cxSetResourceString(&_cxSDatePopupClear, "Löschen");

Note

To localize applications that use standard, DevExpress, or other third-party controls to any language supported by Windows, use the TcxLocalizer component.

See Also

Localizer Editor

dxCore Unit