Solved

active x

Posted on 1998-12-07
1
203 Views
Last Modified: 2013-11-25
i will implement a active-x control that acts as a control ampel with four state (red green yellow white) i create active-x contron that is subclassed of button and will display a bitmap for any state(red ....) how can i load the
bitmp on button.
0
Comment
Question by:saidi
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
ID: 1179465
1. Make sure the button has BS_BITMAP style
2. Load the bitmap with
SendMessage( m_hWnd, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)hBitmap ),

Use LoadBitmap to load the bitmap from resources, e.g.
HBITMAP hBitmap = LoadBitmap( IDB_BITMAP1 ) ;

3. If you simply want to paint the button, override OnDraw, then you can use FillSolidRect to paint the button with your chosen color.

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
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…

809 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