Cheetah Mfc--toolbar toolbar is also a 4-bit, 16-color bitmap Resource

Source: Internet
Author: User

To draw a toolbar picture after adding the toolbar resource:

Declare the CToolBar variable in the header file:
Initialize the toolbar in the initialization function:

The effect is as follows:
To modify the ID of several toolbar buttons created:

To add a message map table for processing buttons:
To declare a menu's handler function in the header file:
Implement the message handler function for the button:
The effect is as follows:
Add a message map for the 2nd button:
Declare a message handler for the 2nd button:
Implement the message handler function for the 2nd button:

、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、////////////////////////////////////////////////////////// The following changes to the 24-bit true Color Picture:
Add the bitmap picture to the project folder Res folder. To add a resource:

Import Bitmap resources.
Modify the ID of the bitmap you just added

Add a 24-bit bitmap to the image list CImageList, and then add the image list CImageList to the toolbar:

The effect is as follows:
To resize a toolbar button:
The effect is as follows:

The following hot.bmp is a dark picture, copied to the Res folder to implement the button after the picture is changed, and then poured into the bitmap resource: Modify the ID of the dark picture and then save: Modify the following code:
Modify the red underline ID to Ilc_mask



From for notes (Wiz)

Cheetah Mfc--toolbar toolbar is also a 4-bit, 16-color bitmap Resource

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.