Solved

The button with icon

Posted on 1997-06-30
1
353 Views
Last Modified: 2013-12-03
MS Visual C++ 4.0 help:
 Button Types and Styles:
. . . .
BS_BITMAP      Windows 95 only: Specifies that the button displays a bitmap.
. . . .
BS_ICON              Windows 95 only: Specifies that the button displays an icon.
. . . .

But I couldn't find any information how to assign the bitmap (or icon)
to the button - that is the question. Please, don't use words like 'MFC'
or 'Owner-drawing' in your answer.
0
Comment
Question by:shvetsov
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
md041797 earned 50 total points
ID: 1399632
Use BM_SETIMAGE:

                 BM_SETIMAGE
                 wParam = (WPARAM) fImageType; // image-type flag
                 lParam = (LPARAM) (HANDLE) hImage; // handle of the image
                   

                 Parameters

                 fImageType

                 Value of wParam. Specifies the type of image to associate with the button. This
                 parameter can be one of the following values:
                 IMAGE_BITMAP IMAGE_ICON

                   

                 hImage

                 Value of lParam. Identifies the image to associate with the button.

                   

                 Return Values

                 The return value is the handle of the image previously associated with the button,
                 if any; otherwise, it is NULL.


Load the bitmap and get a HBITMAP to send with this message.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question