IMLangFontLink::GetFontCodePages method

Gets the set of code pages whose characters can be output in the specified font on the given device context.

Syntax

HRESULT GetFontCodePages(
  [in]  HDC   hDC,
  [in]  HFONT hFont,
  [out] DWORD *pdwCodePages
);

Parameters

  • hDC [in]
    A handle to a device context.

  • hFont [in]
    A handle to a font object.

  • pdwCodePages [out]
    A pointer to an unsigned long integer that receives the address of a set of code pages.

Return value

Returns S_OK if successful, or an error value otherwise.

Examples

The following example shows how to check to see if a character can be output in a specified font on a given device context.

// pMLangFontLink - pointer to an IMLangFontLink interface.

DWORD dwFontCodePages;
DWORD dwCharCodePages;

pMLangFontLink->GetFontCodePages(hDC, hFont, &dwFontCodePages);
pMLangFontLink->GetCharCodePages(ch, &dwCharCodePages);

if(dwCharCodePages & dwFontCodePages)
{
    // Character ch can be output with hFont on hDC.
}

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mlang.h

IDL

Mlang.idl

DLL

Mlang.dll

See also

IMLangFontLink

GetCharCodePages