IMLangFontLink Interface     IMLangFontLink::MapFont M...     IMLangFontLink Interface    
Web Workshop (Miscellaneous)

IMLangFontLink::GetFontCodePages Method


Retrieves the set of code pages whose characters can be output by the given font on the given device context.

Syntax

HRESULT GetFontCodePages(
    HDC hDC,
    HFONT hFont, 
    DWORD *pdwCodePages
);

Parameters

hDC
[in] Handle to a device context.
hFont
[in] Handle to a font object.
pdwCodePages
[out] Address of an unsigned long integer that receives the address of a set of code pages.

Return Value

Returns S_OK if successful, or an error code otherwise.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

Example

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.
}

See Also

IMLangCodePages::GetCharCodePages



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.