ArticleDirectory
- 1. # include <atlctrlx. h>
- 2. Add a static control in the dialog box.
- 3. Modify the ID of the static control.
- 4. Bind DDX.
- 5. Add the processing code
This article describes how to add hyperlink support for wtl development in Windows Mobile and Windows Embedded ce.
The procedure is as follows:
1. # include <atlctrlx. h>
# Include<Atlctrlx. h>
2. Add a static control in the dialog box.
3. Modify the ID of the static control.
4. Bind DDX.
Note that you must manually enter chyperlink for member type.
DDX type must use control instead of Control Handler. Otherwise, the following error occurs during compilation.
Error 1 error c2679: Binary'=': NoOperatorFound which takes a right-hand operand of Type'Atl: cwindow'(Or there is no acceptable conversion)
5. Add to processing Code
M_wndwebsite.sethyperlinkextendedstyle (hlink_usetags );// Set Style
M_wndwebsite.setlabel (_ T ("Visit <A> www.cnblogs.com/procoder </a>"));// Set display label
M_wndwebsite.sethyperlink (_ T (Http://www.cnblogs.com/procoder"));// Set hyper link
The result is as follows: