Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Question about wxStaticBitmap, calling failed...

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Question about wxStaticBitmap, calling failed...
#4556
Posted by: mooncake 2004-06-20 23:21:49
Hi, i'm coding like this:

wxStaticBitmap(this, -1, 
                  wxBitmap("../menu.gif", wxBITMAP_TYPE_GIF ), 
                  wxDefaultPosition, 
                  wxDefaultSize);

but it prompt me "No image handler for type 13 defined", what can i do now?

thank you..
Meow~
Message2. Re: Question about wxStaticBitmap, calling failed...
#4558
Posted by: upCASE 2004-06-20 23:51:36
Hi!
Either init all image handlers with (tataaaa) wxInitAllImageHandlers() before using the GIF file, or use wxImage::AddHandler( new wxGIFHandler );
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: Question about wxStaticBitmap, calling failed...
#4560
Posted by: mooncake 2004-06-20 23:58:28
Hi Upcase,

it seems like no error anymore, but, why i dont get any image on screen?

wxInitAllImageHandlers();
    wxStaticBitmap(this, -1, 
                  wxBitmap("../menu.gif", wxBITMAP_TYPE_GIF ), 
                  wxDefaultPosition, 
                  wxDefaultSize);
Thank you
Meow~
Message4. Re: Question about wxStaticBitmap, calling failed...
#4566
Posted by: upCASE 2004-06-21 15:48:51
Hi!
Problem could be that by setting the default size/position nothing gets displayed. Setting a size should do the job. Better load the bitmap first, then display it using the bitmaps size, or use a fixed size.
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message5. Re: Question about wxStaticBitmap, calling failed...
#4567
Posted by: mooncake 2004-06-21 18:16:35
The image size is 120*36

wxStaticBitmap(panel, -1,
                  wxBitmap("../menu.gif", wxBITMAP_TYPE_GIF ),
                  wxPoint(1,10),
                  wxSize(300,200));
   

Still no image displayed.. :(

Thank you..
Meow~
Message6. Re: Question about wxStaticBitmap, calling failed...
#4569
Posted by: mooncake 2004-06-21 21:33:14
I solved the problem already...
Meow~
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sun 2022-12-4  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0