Solved

How to use CBitmapButton dynamically

Posted on 1998-05-03
1
326 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
[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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
iSeries DB2 Query 2 101
Shell script to login to remote m/c and execute commands 10 80
while loop over for loop 7 119
countEvens challenge 2 117
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.

732 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