Click here to Skip to main content
15,899,314 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In a simple project, I draw my own bitmap, and create a button,how can I connect them?
Posted

Check this link

MFC Controls - Bitmap Button[^]
 
Share this answer
 
Comments
Member 10289628 25-Sep-13 3:32am    
It's useful,I tried the program but my vs2008 told me " Debug Assertion failed!" The error happed in the winbtn.cpp, I only add the following to the BOOL CButtonSampleDlg::OnInitDialog()
CBitmapButton *btnMap = new CBitmapButton;

btnMap->Create(NULL, WS_CHILD | WS_VISIBLE | BS_OWNERDRAW,
CRect(10,10,100,100), this, IDC_BUTTON1);
btnMap->LoadBitmaps(IDB_BTMAP1);
Member 10289628 25-Sep-13 4:03am    
ouyeah~I make it~wow~Thank you!^_^
You didn't check out the documentation[^] yet, did you?
 
Share this answer
 
v2
Comments
Member 10289628 25-Sep-13 4:03am    
ouyeah~I make it~wow~Thank you!^_^
CPallini 25-Sep-13 4:37am    
You are welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900