图像上的超链接 [英] Hyperlink on Image

查看:99
本文介绍了图像上的超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在父窗口中创建JPG图像.图片不在本地计算机上(即,我应该从Internet中的指定URL获取图片).然后我必须在上面放一个超链接.

I have to create a JPG image in the parent window. Image is not on local machine (i.e. I should get it from a specified URL in Internet ). Then I must put a hyperlink on it.
Is there any way to do that?

推荐答案

不要发布假答案,请编辑您的帖子.

如果不编写代码,就无法神奇地将图片制成超链接.您只需捕获绘制图片的控件上的click事件就可以做到,而无需任何子类化.但是,如果不编写某种代码就无法做到这一点,如果没有对它进行编码,就无法创建不存在的行为.
Don''t post fake answers, edit your post.

You can''t magically make a picture into a hyperlink without writing code. You CAN do it without subclassing anything, by just catching the click event on the control that draws the picture. But, you can''t do it without writing some sort of code, there''s no way to create a behaviour that doesn''t exist without coding it.


是的,你可以从指定的URL下载图像(可以使用套接字),然后将获取的图像放在静态控件上(可以将其子类化以启用超链接).

自己尝试一下,如果遇到问题,请在此处提出一个具体问题.或搜索有关自定义静态控件的文章. CP上有很多.
Yes, you could download the image from the specified URL (you could use sockets) and then put the acquired image on a static control (which you could have subclassed to have it hyperlink enabled).

Try that yourself, and ask a specific question here if you get stuck. Or search for articles on customised static controls. There are plenty of those on CP.


这篇关于图像上的超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆