Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / How I can show wxIcon on wxDialog window?

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

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. How I can show wxIcon on wxDialog window?
#2479
Posted by: PathFinder 2003-08-19 14:44:48
I try this code inside constructor of class derived from wxDialog:

	wxGridSizer *gs = new wxGridSizer(2, 3, 3);
	wxBitmap bitmap = wxBitmap(wxIcon("Question")); // <-- resource: Question ICON "Question.ico"
	gs->Add(new wxStaticBitmap(this, -1, bitmap), 0, wxALIGN_LEFT);
	gs->Add(new wxStaticText(this, -1, "Hello, world!"), 1, wxEXPAND);
	SetSizerAndFit(gs);

and get no icon showed.(
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Thu 2024-10-3  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0