?
Solved

The button with icon

Posted on 1997-06-30
1
Medium Priority
?
355 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 200 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

801 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