共用方式為


DTM_LAYOUTWIDTH

Send Feedback

This message is sent by an application to determine the layout width (in pixels) of the client area.

Syntax

DTM_LAYOUTWIDTH
  wParam = 0;
  lParam = 0;

Parameters

None.

Return Values

The value is the width (in pixels) of the client area.

Remarks

The layout width number changes depending on whether a scroll bar appears (changing the width of the client area), and it is independent of the characters and strings that are being added to the page.

When the text width is larger than the client area (for example a large word than can not be wrapped), this message returns the width (in pixels) occupied by the text.

When the text width is smaller than the client area, this message returns the width (in pixels) of the client area.

If there is a blank page or when "blank page" == DTM_CLEAR, both width and height should be 0 and DTM_LAYOUTWIDTH returns 0.

The following example shows how you might use this message.

lWidth=SendMessage(hWndCtrl, DTM_LAYOUTWIDTH, 0, 0);

Requirements

Pocket PC: Pocket PC 2002 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: htmlctrl.h
Library: htmlctrl.lib

See Also

HTML Control API Messages | DTM_LAYOUTHEIGHT

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.