Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

The button with icon

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

650 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