www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Ask to DFL

reply "jinheking" <caoqi bgi.net.cn> writes:
I use dfl design my programe.(like 
http://wiki.dprogramming.com/Dfl/FormIconExample)
I want to my application's button that it has image.
I use below :
but_Exit.image=Application.resources.getBitmap("./img/exit.bmp");

but when the application running,I could not see this picture
Why? 
Apr 24 2007
parent reply "Chris Miller" <chris dprogramming.com> writes:
On Wed, 25 Apr 2007 02:00:05 -0400, jinheking <caoqi bgi.net.cn> wrote:

 I use dfl design my programe.(like
 http://wiki.dprogramming.com/Dfl/FormIconExample)
 I want to my application's button that it has image.
 I use below :
 but_Exit.image=3DApplication.resources.getBitmap("./img/exit.bmp");

 but when the application running,I could not see this picture
 Why?
You should ask questions like this on the DFL forum: = http://dsource.org/forums/viewforum.php?f=3D39 But to answer your question, resources refer to data embedded into your = = exe by using a resource compiler. To load a bitmap from the file system,= = use new Bitmap("foo.bmp")
Apr 25 2007
parent reply "jinheking" <caoqi bgi.net.cn> writes:
the *.rc file ,how to write?
thx
"Chris Miller" <chris dprogramming.com>
写入消息新闻:op.trbxi4n0po9bzi tanu2003.tanu2003net.local...
On Wed, 25 Apr 2007 02:00:05 -0400, jinheking <caoqi bgi.net.cn> wrote:

 I use dfl design my programe.(like
 http://wiki.dprogramming.com/Dfl/FormIconExample)
 I want to my application's button that it has image.
 I use below :
 but_Exit.image=Application.resources.getBitmap("./img/exit.bmp");

 but when the application running,I could not see this picture
 Why?
You should ask questions like this on the DFL forum: http://dsource.org/forums/viewforum.php?f=39 But to answer your question, resources refer to data embedded into your exe by using a resource compiler. To load a bitmap from the file system, use new Bitmap("foo.bmp")
Apr 25 2007
parent jcc7 <technocrat7 gmail.com> writes:
== Quote from jinheking (caoqi bgi.net.cn)'s article
 the *.rc file ,how to write?
 thx
Does this help? http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=52576 jcc7
Apr 26 2007