Winx tutorial in my practice (7)

Source: Internet
Author: User

Today, let's take a look at how to modify the application icon (small icon. The small icon is the icon shown by the arrow and in the red box ,:)

Below is the System icon of the window. Click the system operation menu for this window to pop up:


The following is the icon of the executable file of the application, which is slightly larger:


Let's take a look at how to modify them, which is the content of instance 7-step007-icon. Here, we can also see how to modify the system icon of the window, or System icon for short.

What we need to know is actually two macros:

  • Winx_app_icon

  • Winx_sysicon

Winx_app_icon

Usage: winx_app_icon (hinstance, idi_search );

Idi_search specifies the ID of the icon in the Application resource, while hinstance specifies the application resource to be selected.

Note: There is a semicolon!

Using the winx_app_icon macro, we can specify all the icons related to the application, such as the system icons of all the windows of the application (including the dialog box, message box, and general window) (in the upper left corner of the window ), the icon of the executable file of the application.

Because the hinstance parameter is required for the winx_app_icon macro, this macro is generally placed in winmain to specify the entire application-related icon.

Winx_sysicon

Usage: winx_sysicon (idi_information );

Idi_information is used to specify the resource ID of the System icon and application icon.

As the name suggests, the System icon of the window specified by the winx_sysicon user. That is to say, if you want to change the default system icon of the window, you need to define the winx_sysicon Macro when defining this window class (not wndclass.

Today's Practice

We only need to modify the appicon program in the step007-icon of this instance 7, you can understand the difference:

Class chellodlg: Public winx: modaldialog <chellodlg, idd_hello>

{

Winx_sysicon (idi_information );

};

The execution result after compilation is as follows:


<End>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.