Solved

How to use CBitmapButton dynamically

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
countEvens challenge 2 74
Window placement 17 74
pre4 challenge 19 93
Sed question 2 68
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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 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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

914 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now