Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

The DTM_ADDSTYLEmessage is sent by an application to the HTML viewer control to request that default style sheet rules be applied to the current HTML window.

Syntax

DTM_ADDSTYLE
  wParam = 0
  lParam = (LPARAM)(LPCWSTR) 
pszStyle;

Parameters

wParam

Not used

pszStyle

Reference to a string that contains the style sheet rules to add to the current HTML window

Return Value

None.

Remarks

Style sheet rules applied with DTM_ADDSTYLEare reset with the message DTM_CLEAR. Style sheet rules are also reset with the message DTM_NAVIGATE. Sending DTM_ADDSTYLEmessages does not affect pages that are navigated to with the message DTM_NAVIGATE.

The following example shows how you might use this message.

Copy Code
LPCWSTR 
pszStyle = TEXT("BODY { border-color: red; border-width:
2px; 
				 border-style: solid; }");
SendMessage(hwndHTML, , 0, (LPARAM)pszStyle);

Requirements

Header htmlctrl.h
Library htmlctrl.lib
Windows Mobile Pocket PC for Windows Mobile 2003 and later, Smartphone for Windows Mobile 2003 and later

See Also