how to add an backrground image in a form?
-
hi, i'am trying to add an image as background of a form. but i don't know , how to add? if you know please tell me thanks panthal
-
hi, i'am trying to add an image as background of a form. but i don't know , how to add? if you know please tell me thanks panthal
panthal wrote:
if you know please tell me
See here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
hi, i'am trying to add an image as background of a form. but i don't know , how to add? if you know please tell me thanks panthal
If you want to show image on the forum you can use of
WM_ERASEBKGN
with CImage class like this#include "AtlImage.h"
CImage m_Image;
m_Image.Load("c:\\123.jpg");BOOL CdddDlg::OnEraseBkgnd(CDC* pDC)
{ppp.BitBlt(pDC->m_hDC,0,0);
return TRUE;
}This is a minumum code for show image on the forum. But if you want to use of a control to show an image you can use of Static control you must insert Static control of Toolbar on the forum and use of this code
CImage m_Image;
m_Image.Load("c:\\1234.jpg");
m_Static.SetBitmap(m_Image.Detach());