display an image in a dialog box

onkelhotte
Total Points:
2,900
Status Points:
2,400
Brown Belt
June 24, 2009 12:53 AM PDT
Rate
 
#2
To display a Bitmap on a button, you have to do the following:

1.) Import this bitmap to your resource file (name is IDB_BITMAP)
2.) Set your IDC_BUTTON bitamp true
3.) Use the following code

hInst=GetModuleHandle(NULL)
hBitmap=LoadBitmap(hInst,IDB_BITMAP)
l=SendMessage(GetDlgItem(dlg%hwnd,IDC_BUTTON),BM_SETIMAGE,IMAGE_BITMAP,hBitmap)

Markus


Intel Software Network Forums Statistics

8479 users have contributed to 31611 threads and 100667 posts to date.
In the past 24 hours, we have 31 new thread(s) 108 new posts(s), and 167 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member zhpn