Overrides the OnInitDialog function, Windows Title, Icon
来源:互联网 发布:MAC 百度网盘 编辑:程序博客网 时间:2024/06/05 01:58
VC中需要改变窗口的标题和图标,如果不是主窗口,需要添加OnInitDialog函数,具体如下,在类中选择副窗口的类,再选择Overrides图标,如下,
这样就创建了OnInitDialog函数,在其中添加SetWindowText()函数就可以改变标题,例如,
CString msg;
msg.Format(_T("New Titel"));
SetWindowText(msg); //set the window text as '"New Titel'
改变窗口图标使用,首先声明图标变量,
HICON m_hIcon;
构造函数中添加图标,
m_hIcon = AfxGetApp()->LoadIcon(IDI_WD);
OnInitDialog函数中添加设置图标,
SetIcon(m_hIcon, TRUE);// Set big icon
SetIcon(m_hIcon, FALSE);// Set small icon
如何改变可执行文件的图标,如下,
首先添加你想要的图标到资源中,例如为IDI_EARTH ,再打开Header文件下的Resource.h, 找到IDI_EARTH,系统默认从128开始的,改成比128小,就将可执行文件的图标改成IDI_EARTH了。
- Overrides the OnInitDialog function, Windows Title, Icon
- How to set the QT Application icon in the windows.
- Xcode6: CocoaPods 错误 target overrides the `OTHER_LDFLAGS`...
- target overrides the FRAMEWORK_SEARCH_PATHS build settings
- Xcode6: CocoaPods 错误 target overrides the `OTHER_LDFLAGS`...
- CocoaPods 错误 target overrides the `OTHER_LDFLAGS`...
- CocoaPods 错误 target overrides the `OTHER_LDFLAGS`
- CocoaPods 错误 target overrides the `OTHER_LDFLAGS`...
- OninitDialog
- title to url function
- Windows Via C/C++: The CreateProcess function
- 给activity的title设置icon
- 网页title前面加上自己的icon
- 去掉actionbar的icon和title
- iOS开发--Xcode6: CocoaPods 错误 target overrides the `OTHER_LDFLAGS`
- 小胖说事44-----iOS cocoaPods错误: target overrides the `OTHER_LDFLAGS`...
- iOS-Bug收集:CocoaPods 错误 target overrides the `OTHER_LDFLAGS`...
- Setting the Application Icon
- sharepoint 2010 控制台应用程序 找不到位于 http://xxx 的 Web 应用程序
- JAVA内存溢出 解决方案
- 解析HTML5 Web Forms 2.0 新特性
- Balanced Binary Tree
- Unknown error: java.lang.NullPointerException.
- Overrides the OnInitDialog function, Windows Title, Icon
- 如何进行网站的广告数据分析
- .net后台POST传值
- Linux下的TCP通信
- Magento去掉底部recent viewed和best seller
- 用java判断数据库某个表是否存在
- STK / Connect 模块分析与应用
- 插入排序
- OBIEE菜鸟历程:问题记录