| 编程中国 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛
全能ASP/PHP/ASP.NET主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付赛孚耐:软件保护加密专家
身份认证令牌USB KEY   
共有 1914 人关注过本帖
标题:如何修改程序的标题栏图标
收藏  订阅  推荐  打印 
wudong8866
Rank: 2
等级:注册会员
帖子:37
积分:500
注册:2007-10-9
如何修改程序的标题栏图标

怎么样去修改标题栏的图标,我的意思是用程序修改;如单文档程序中....
这样程序在运行时,可以自己去调用和修改其标题栏图标;

搜索更多相关主题的帖子: 图标  
2007-11-15 18:49
wudong8866
Rank: 2
等级:注册会员
帖子:37
积分:500
注册:2007-10-9

怎么样去修改标题栏的图标,我的意思是用程序修改;如单文档程序中....
这样程序在运行时,可以自己去调用和修改其标题栏图标;
怎么没有人理我啊?

2007-11-15 19:00
yuyunliuhen
Rank: 12Rank: 12Rank: 12
等级:贵宾
威望:20
帖子:1423
积分:14506
注册:2005-12-12


只是些测试的程序,不过里面有你想要的^_^,包含可执行程序

[此贴子已经被作者于2007-11-15 20:26:32编辑过]

附件: 只有本站会员才能下载或查看附件,请您 登录注册

Go confidently in the  directions of your dreams,live the life you have imagined!Just do it!
It is no use learning without thinking!
2007-11-15 19:14
ding_inshili
Rank: 2
等级:注册会员
帖子:59
积分:690
注册:2007-9-13

上面的兄弟啊,
error C2065: 'SetClassLongPtr' : undeclared identifier
error C2065: 'GCLP_HCURSOR' : undeclared identifier
是怎么回事啊?

2007-11-15 19:37
yuyunliuhen
Rank: 12Rank: 12Rank: 12
等级:贵宾
威望:20
帖子:1423
积分:14506
注册:2005-12-12

SetClassLongPtr 是替代SetClassLong这个函数,具体可以查查CSDN,
////////////////////////////////////////////////////////////////////////////////////////////////
The SetClassLongPtr function replaces the specified value at the specified offset in the extra class memory or the WNDCLASSEX structure for the class to which the specified window belongs

This function supersedes the SetClassLong function. To write code that is compatible with both 32-bit and 64-bit Microsoft Windows, use SetClassLongPtr.

hWnd
[in] Handle to the window and, indirectly, the class to which the window belongs.
nIndex
[in] Specifies the value to replace. To set a value in the extra class memory, specify the positive, zero-based byte offset of the value to be set. Valid values are in the range zero through the number of bytes of extra class memory, minus eight; for example, if you specified 24 or more bytes of extra class memory, a value of 16 would be an index to the third integer. To set a value other than the WNDCLASSEX structure, specify one of the following values.
GCL_CBCLSEXTRA
Sets the size, in bytes, of the extra memory associated with the class. Setting this value does not change the number of extra bytes already allocated.
GCL_CBWNDEXTRA
Sets the size, in bytes, of the extra window memory associated with each window in the class. Setting this value does not change the number of extra bytes already allocated. For information on how to access this memory, see SetWindowLongPtr.
GCLP_ HBRBACKGROUND
Replaces a handle to the background brush associated with the class.
GCLP_HCURSOR
Replaces a handle to the cursor associated with the class.
GCLP_HICON
Replaces a handle to the icon associated with the class.
GCLP_HICONSM
Retrieves a handle to the small icon associated with the class.
GCLP_HMODULE
Replaces a handle to the module that registered the class.
GCLP_MENUNAME
Replaces the pointer to the menu name string. The string identifies the menu resource associated with the class.
GCL_STYLE
Replaces the window-class style bits.
GCLP_WNDPROC
Replaces the pointer to the window procedure associated with the class.
dwNewLong
[in] Specifies the replacement value.

[此贴子已经被作者于2007-11-15 20:04:21编辑过]


Go confidently in the  directions of your dreams,live the life you have imagined!Just do it!
It is no use learning without thinking!
2007-11-15 19:50
wudong8866
Rank: 2
等级:注册会员
帖子:37
积分:500
注册:2007-10-9

看了MSDN了,但不是很明白,能不能帮我改下,能在VC里面运行的,我再下回来好好研究下;


2007-11-15 20:06
rocketabc
Rank: 2
等级:注册会员
帖子:100
积分:1152
注册:2006-7-6

可以把 你想加载的图标改成 与原图标名字一样, 那加载的时候就加载了新图标了啊


兴趣和爱好是我追求的方向
2007-11-15 21:47
wudong8866
Rank: 2
等级:注册会员
帖子:37
积分:500
注册:2007-10-9

不明白楼上是什么意思,说明白呢,呵,

2007-11-16 08:33
wudong8866
Rank: 2
等级:注册会员
帖子:37
积分:500
注册:2007-10-9

呵,多谢yuyunliuhen,有兴趣的大家一起研究下上面的代码吧.

2007-11-16 08:37
rocketabc
Rank: 2
等级:注册会员
帖子:100
积分:1152
注册:2006-7-6

图标不就是一个ico 么 ,把你想要换的ico名字换成原来的名字不就加载上去了

兴趣和爱好是我追求的方向
2007-11-16 14:16
关于我们 | 广告合作 | 编程中国 | 清除Cookies | Archiver | WAP | TOP

编程中国 版权所有,并保留所有权利。鲁ICP备08000592号
Powered by Discuz, Processed in 0.073300 second(s), 9 queries.
Copyright©2004-2008, BCCN.NET, All Rights Reserved