2 May, 2003
This is a new static control I created a while ago because I can't find one
after poring through the net for a long, long time. I just recently found
out that there are good and perhaps better implementations of static hyperlink
controls out there. But IMHO mine has served me well enough that I want to
share it with you.
The control is sub-classed from CStatic so it is compatible with MFC.
CHyperLink sports the following members:
GetActiveColor - Gets the color of the active link (when the link is being opened).
SetActiveColor - Sets the color of the active link.
GetHoverColor - Gets the hover color of the link (when the mouse is over the control).
SetHoverColor - Sets the hover color of the link.
GetLinkColor - Gets the link color.
SetLinkColor - Sets the link color.
GetVisitedColor - Gets the color of already visited link.
SetVisitedColor - Sets the color of already visited link.
GetBkColor - Gets the background color.
SetBkColor - Sets the background color. Automatically sets the
background mode to OPAQUE.
GetBkMode - Gets the background mode. If the mode is OPAQUE, the
background is filled first with current background color.
SetBkMode - Sets the background mode.
GetUnderline - Gets the underline mode. Values are ALWAYS = 0, ONHOVER = 1, NONE = 2.
Default is ALWAYS.
SetUnderline - Sets the underline mode.
GetToolTipText - Gets the tool tip text.
SetToolTipText - Sets the tool tip text.
GetURL - Gets the URL (Uniform Resource Locator) string.
SetURL - Sets the URL (Uniform Resource Locator) string.
GetLinkCursor - Gets the HCURSOR used as the current mouse cursor for the control.
SetLinkCursor - Sets the HCURSOR used as the current mouse cursor for the control.
To manipulate the caption, just use CWnd::GetWindowText and CWnd::SetWindowText.
CWnd::SetFont is also used for setting the font. Theoretically, the class should
work with any static control but I haven't tested it with all conceivable static
controls.
This code is provided as is without guarantee, expressed or implied, that it will
work as expected under all conditions. I will not shoulder any liabilities arising
from its use and/or misuse.
Feel free to change/improve the code. Please send me a copy if you do make
improvements. :)
Copyright (c) 2002-03 Mark Jundo P. Documento
All rights reserved.
home: http://www.angelfire.com/blues2/javeline
email: javelinexxx@yahoo.com
没有合适的资源?快使用搜索试试~ 我知道了~
HyberLinkStatic
共26个文件
h:6个
cpp:5个
sbr:5个
需积分: 0 4 下载量 81 浏览量
2008-11-18
16:38:52
上传
评论
收藏 1.35MB RAR 举报
温馨提示
在一个即将发布的Application上很多需要链接到公司主页。所以将用到的这个控件源代码分享,是我收集来的。
资源详情
资源评论
资源推荐
收起资源包目录
HyperLink.rar (26个子文件)
HyperLink
HyperLink.rc 6KB
StdAfx.cpp 211B
resource.h 1KB
HyperLinkCtrl.h 3KB
HyperLink.dsw 543B
OptionsDlg.h 1KB
HyperLink.h 1KB
HyperLink.cpp 1KB
HyperLinkDlg.cpp 4KB
Readme.txt 3KB
StdAfx.h 1KB
Release
HyperLinkCtrl.sbr 0B
OptionsDlg.sbr 0B
HyperLink.bsc 3.23MB
HyperLink.sbr 0B
StdAfx.sbr 1.47MB
HyperLinkDlg.sbr 0B
OptionsDlg.cpp 1KB
HyperLinkDlg.h 1KB
res
email.cur 326B
hand.cur 326B
HyperLink.ico 1KB
HyperLink.rc2 401B
HyperLinkCtrl.cpp 8KB
HyperLink.dsp 5KB
Bin
HyperLink.exe 36KB
共 26 条
- 1
waterathena
- 粉丝: 109
- 资源: 18
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0