Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to output CImage bitmaps to dialogs...

Status
Not open for further replies.

sntpaul

Programmer
Jan 31, 2003
4
GB
hi all,

does anybody know how a CImage bitmap can be outputted to a dialog box? i want to use CImage because i have access to setpixel commands.

thanks,
Paul.

 
On wich place of Dialog Box? The best way, You use Static Control (for example, IDC_STATIC1), then it is easy:

GetDlgItem( IDC_STATIC1)->ModifyStyle( SS_ICON , SS_BITMAP | SS_CENTERIMAGE ); //Default style is Icon
CStatic * sbmp = (CStatic *)GetDlgItem( IDC_STATIC1);
CBitmap bmp;
//Make CBitmap You wish
......
GetDlgItem( IDC_STATIC1)->ShowWindow(SW_HIDE ); //To make it working in all cases
sbmp->SetBitmap( (HBITMAP)bmp ); //Set bitmap
GetDlgItem( IDC_STATIC1)->ShowWindow(SW_SHOWNORMAL ); //To make it working in all cases
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top