Solved

How to use CBitmapButton dynamically

Posted on 1998-05-03
1
324 Views
Last Modified: 2013-11-19
I would like to create a CBitmapButton dynamically and place it in some coordinates. I have my bitmaps in resources and I don't have any button created in my dialog, who is itself dynamically created.
0
Comment
Question by:fmichaud061597
1 Comment
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 1306364
1. Define a member variable of your dialog box class as follows:
   CBitmapButton m_bmpBtn;
2. In your overridden OnInitDialog() function:
   m_bmpBtn.Create("Bitmap Button", BS_PUSHBUTTON | BS_OWNERDRAW, rect, this, ID_BMPBTN);
   m_bmpBtn.LoadBitmaps(ID_BMP1, ID_BMP2, ID_BMP3, ID_BMP4);
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

773 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