| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 5726 人关注过本帖
标题:如何修改程序的标题栏图标
只看楼主 加入收藏
wudong8866
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2007-10-9
收藏
 问题点数:0 回复次数:14 
如何修改程序的标题栏图标

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

搜索更多相关主题的帖子: 图标 
2007-11-15 18:49
wudong8866
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2007-10-9
收藏
得分:0 
怎么样去修改标题栏的图标,我的意思是用程序修改;如单文档程序中....
这样程序在运行时,可以自己去调用和修改其标题栏图标;
怎么没有人理我啊?

2007-11-15 19:00
yuyunliuhen
Rank: 6Rank: 6
等 级:贵宾
威 望:20
帖 子:1435
专家分:0
注 册:2005-12-12
收藏
得分:0 

只是些测试的程序,不过里面有你想要的^_^,包含可执行程序
VYCk7FSr.rar (510.91 KB)

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



YLNXf8GN.rar (58.75 KB) 如何修改程序的标题栏图标



aPdcJrkD.rar (1.91 MB)

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: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2007-9-13
收藏
得分:0 
上面的兄弟啊,
error C2065: 'SetClassLongPtr' : undeclared identifier
error C2065: 'GCLP_HCURSOR' : undeclared identifier
是怎么回事啊?

2007-11-15 19:37
yuyunliuhen
Rank: 6Rank: 6
等 级:贵宾
威 望:20
帖 子:1435
专家分:0
注 册:2005-12-12
收藏
得分:0 
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: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2007-10-9
收藏
得分:0 

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


2007-11-15 20:06
rocketabc
Rank: 1
等 级:新手上路
帖 子:100
专家分:0
注 册:2006-7-6
收藏
得分:0 

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


兴趣和爱好是我追求的方向
2007-11-15 21:47
wudong8866
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2007-10-9
收藏
得分:0 
不明白楼上是什么意思,说明白呢,呵,

2007-11-16 08:33
wudong8866
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2007-10-9
收藏
得分:0 
呵,多谢yuyunliuhen,有兴趣的大家一起研究下上面的代码吧.

2007-11-16 08:37
rocketabc
Rank: 1
等 级:新手上路
帖 子:100
专家分:0
注 册:2006-7-6
收藏
得分:0 
图标不就是一个ico 么 ,把你想要换的ico名字换成原来的名字不就加载上去了

兴趣和爱好是我追求的方向
2007-11-16 14:16
快速回复:如何修改程序的标题栏图标
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012486 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved