Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / wxStaticBitmap problems with setting an image

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

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. wxStaticBitmap problems with setting an image
#5734
Posted by: 2005-01-22 04:09:15
i don't know what do i do wrong but every time i try to set an image or bitmap to a wxStaticBitmap window the program stops (at the debugging stage), here i will paste a code i think everything is ok

{
wxString FILENAME2  = wxFileSelector("Choose panorama image","","",NULL,"Any File|*.*",wxOPEN|wxFILE_MUST_EXIST);

if ( FILENAME2.IsEmpty() == true ) return ;

wxBitmap bitmap_obj;

if (!bitmap_obj.LoadFile(FILENAME2, wxBITMAP_TYPE_ANY))
   return;

if (!bitmap_obj.Ok()) return;

GetNewTest()->SetBitmap(bitmap_obj);
}

and

wxStaticBitmap* GetNewTest()  { return (wxStaticBitmap*) FindWindow( ID_NewTest ); }

thx for any help

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-4-20  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0