Background Image at Runtime.!
Hi ALL.,
I would like to change the skin of my dialog based application .
How can I set background image (Bitmap file ) at run time.?
Any codes or help would be highly appreiciated.!
Thanks.!
[225 byte] By [
newnick] at [2007-11-17 22:38:28]

# 1 Re: Background Image at Runtime.!
In the dialogs and bmp section you can find some examples.
# 2 Re: Background Image at Runtime.!
Thanks a lot Doctor Luz. for your prompt reply..!
Is there any article on runtime skin changing.? Coz, I couldn't find .. Help me please..!
Thanks again.!
Dillip at 2007-11-10 8:42:39 >

# 3 Re: Background Image at Runtime.!
Maybe this ( http://www.dev-archive.com/dialog/Skin.html)
# 4 Re: Background Image at Runtime.!
Thanks Doctor Luz .!
I was going thru that sample code...
But, i need to change the back ground image (say a bitmap) at runtime by selecting the bmp file from the disk .
Can you plz help me.?
# 5 Re: Background Image at Runtime.!
If you want to select the file yourself you can use CFileDialog
CFileDialog cl(TRUE,NULL,NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"Bmp files *.bmp |*.bmp|All files|*.*||",this);
cl.m_ofn.Flags=cl.m_ofn.Flags|OFN_SHAREAWARE;
CString fullpath;
int ret=cl.DoModal();
if (ret==IDOK)
{
fullpath=cl.GetPathName();
//now in fullpath you have the full path to the bmp file
}
Then you should load and do the same way than the sample (I suppose because i have not readed the sample)
# 6 Re: Background Image at Runtime.!
Thanks for your helping tendency Doctor Luz.
I know about selecting a file from the harddisk .. But , how to set that bmp file as background image .. I don't know..
Is there any way to do this.?
# 7 Re: Background Image at Runtime.!
here (http://www.dev-archive.com/bitmap/index.shtml) you could find code for loading bitmaps from file. Please, check the samples yourself.
and you can use this other example (http://www.dev-archive.com/dialog/BmpDlg.shtml) for displaying in a dialog if the last example did not helped you.
And please, do not open a new thread or you could receive a reprimand from the moderators :D
# 8 Re: Background Image at Runtime.!
Sorry for opening new thread which was unintentional... due to my mistake .
I will see the sample codes ..
Thanks again Doctor Luz. .!
# 9 Re: Background Image at Runtime.!
Originally posted by Doctor Luz
And please, do not open a new thread or you could receive a reprimand from the moderators :D
Yes, please be careful to hit "Reply" and not "Create Thread" ;)
Yves M at 2007-11-10 8:49:51 >
