当前位置: 首页>>代码示例>>C++>>正文


C++ MyFrame::SetMinSize方法代码示例

本文整理汇总了C++中MyFrame::SetMinSize方法的典型用法代码示例。如果您正苦于以下问题:C++ MyFrame::SetMinSize方法的具体用法?C++ MyFrame::SetMinSize怎么用?C++ MyFrame::SetMinSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MyFrame的用法示例。


在下文中一共展示了MyFrame::SetMinSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnInit

bool MyApp::OnInit()
{
	MyFrame *frame = new MyFrame(L"发票凑整", wxPoint(-1, -1), wxSize(-1, -1));
	frame->SetMinSize(wxSize(640, 480));
	frame->Show(true);
	return true;
}
开发者ID:sagaxu,项目名称:xcalc,代码行数:7,代码来源:main.cpp

示例2: 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;
}
开发者ID:iamima,项目名称:biwoo_wxwidgets,代码行数:80,代码来源:App.cpp


注:本文中的MyFrame::SetMinSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。