[英]top-left corner icon on a dialog from resources in C++
thank you in advance. 先感谢您。
I'm developing an application in Win32 C++ which its main window comes up from a resource file because it's easier to place controls. 我正在Win32 C ++中开发一个应用程序,该应用程序的主窗口来自资源文件,因为它更容易放置控件。
to that I use CreateDialog a statement 我使用CreateDialog声明
The problem is, I don't achieve to put it an Icon such as I could with CreateWindow statement at the WNDCLASSEX sctructure. 问题是,我无法像在WNDCLASSEX结构上使用CreateWindow语句那样放置它作为Icon。
does somebody know the way to get a dialog with that top-left-corner Icon? 有人知道使用该左上角图标进行对话的方法吗?
Thanks 谢谢
您可以让应用程序通过将显示在对话框的标题栏中的图标WS_SYSMENU
和WS_CAPTION
样式对话框模板,并发送WM_SETICON
响应从对话框过程内消息WM_INITDIALOG
消息。
CreateDialog
returns the window handle of the dialog. CreateDialog
返回对话框的窗口句柄。 Send that window WM_SETICON
messages to specify the icon for the window. 发送该窗口
WM_SETICON
消息以指定该窗口的图标。 Or indeed send the messages in response to WM_INITDIALOG
. 或者确实发送消息以响应
WM_INITDIALOG
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.