本文整理汇总了C++中MyFrame::setTaskBarIcon方法的典型用法代码示例。如果您正苦于以下问题:C++ MyFrame::setTaskBarIcon方法的具体用法?C++ MyFrame::setTaskBarIcon怎么用?C++ MyFrame::setTaskBarIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyFrame
的用法示例。
在下文中一共展示了MyFrame::setTaskBarIcon方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnInit
bool MyApp::OnInit()
{
gAppHandler = this;
wxString sFullModleName = ::wxGetFullModuleName();
wxString sAppName = this->GetAppName();
size_t nFind = sFullModleName.rfind(sAppName);
gAppPath = sFullModleName.substr(0, nFind-1).c_str();
setAutorun(BIWOO_NAME.c_str(), sFullModleName.c_str());
wxString xmlFile(gAppPath);
xmlFile.Append(wxT("/default/setting.xml"));
gSetting.load(xmlFile.c_str());
setlocale(LC_ALL, gSetting.locale().c_str());
//setlocale(LC_ALL,"Chinese-simplified");
//std::locale::global(std::locale("Chinese-simplified"));
CCgcAddress serverAddress(gSetting.address(), CCgcAddress::ST_UDP);
if (!m_biwoo.start(serverAddress, (CbiwooHandler*)this))
{
//m_biwoo.stop();
//return false;
}
xmlFile = gAppPath.c_str();
xmlFile.Append(wxT("/default/"));
xmlFile.Append(gSetting.langtext());
gLangText.load(xmlFile.c_str());
/////////////////////////////////////
// test
//CDlgSetting dlgSetting(NULL);
//dlgSetting.ShowModal();
if ( !wxApp::OnInit() )
{
m_biwoo.stop();
return false;
}
CDlglogin dlgLogin(NULL, false);
int ret = dlgLogin.ShowModal();
if (ret != wxID_OK)
{
m_biwoo.stop();
wxApp::OnExit();
return false;
}
gMyAccount = dlgLogin.accountInfo();
BOOST_ASSERT (gMyAccount.get() != 0);
// create the main application window
MyFrame * frame = new MyFrame(_T("BIWOO App"), wxSize(700, 450));
m_biwoo.setHandler(gAppHandler);
m_biwoo.accountLoad();
wxString title = wxString::Format("%s - %s(%s)", BIWOO_NAME.c_str(), gMyAccount->getUserinfo()->getUserName().c_str(), gMyAccount->getUserinfo()->getAccount().c_str());
frame->SetTitle(title);
frame->setTaskBarIcon(wxT("mainframe.ico"), title);
#if defined(__WXMOTIF__)
int width, height;
frame->GetSize(& width, & height);
frame->SetSize(wxDefaultCoord, wxDefaultCoord, width, height);
#endif
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
frame->SetMinSize(wxSize(700, 450));
frame->Show(true);
//SetTopWindow(frame);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned false here, the
// application would exit immediately.
return true;
}