Share via


DTM_ADDSTYLE

4/8/2010

The DTM_ADDSTYLE message 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_ADDSTYLE are reset with the message DTM_CLEAR. Style sheet rules are also reset with the message DTM_NAVIGATE. Sending DTM_ADDSTYLE messages does not affect pages that are navigated to with the message DTM_NAVIGATE.

The following example shows how you might use this message.

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

Reference

HTML Control API Messages
DTM_ADDTEXT
DTM_ADDTEXTW
DTM_CLEAR
DTM_ENDOFSOURCE