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


C++ CFrameWnd::Create方法代码示例

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


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

示例1: CreatePane

CXTPDockingPane* CMainFrame::CreatePane(int x, int y, CRuntimeClass* pNewViewClass, CString strFormat, XTPDockingPaneDirection direction, CXTPDockingPane* pNeighbour)
{
	//做个标记
	int nID = ++m_nCount;
	
	CXTPDockingPane* pwndPane = m_paneManager.CreatePane(nID, CRect(0, 0,x, y), direction, pNeighbour);
	
	CString strTitle;
	strTitle.Format(strFormat, nID);
	pwndPane->SetTitle(strTitle);
	pwndPane->SetIconID(nID % 6 + 1);
	
	CFrameWnd* pFrame = new CFrameWnd;
	
	CCreateContext context;
	context.m_pNewViewClass = pNewViewClass;
	context.m_pCurrentDoc = GetActiveView()->GetDocument();
	
	pFrame->Create(NULL, NULL, WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, CRect(0, 0, 0, 0), this, NULL, 0, &context);
	pFrame->ModifyStyleEx(WS_EX_CLIENTEDGE, 0);
	
	m_mapPanes.SetAt(nID, pFrame);
	
	return pwndPane;
}
开发者ID:b1ueb0y,项目名称:LViewer,代码行数:25,代码来源:MainFrm.cpp

示例2: InitInstance

	BOOL InitInstance()
	{
		CFrameWnd* pFrame = new CFrameWnd;
		pFrame->Create(NULL, L"Hello MFC");
		pFrame->ShowWindow(m_nCmdShow);
		pFrame->UpdateWindow();
		m_pMainWnd = pFrame;
		return TRUE;
	}
开发者ID:harpreettakhi,项目名称:harpreettakhi-code,代码行数:9,代码来源:mfcmintest.cpp

示例3: _tWinMain

int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
    ::CoInitialize(NULL);
	CWkeWebkitUI::WkeWebkit_Init();

    CPaintManagerUI::SetInstance(hInstance);
//	CPaintManagerUI::SetResourceZip(_T("Main_dlg.zip"));
	CFrameWnd *pFrame = CFrameWnd::MainWnd();
    pFrame->Create(NULL, _T("360度全景照相技术"), UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE);
    pFrame->ShowModal();

	CWkeWebkitUI::WkeWebkit_Shutdown();
//    delete pFrame;
    ::CoUninitialize();
    return 0;
}
开发者ID:276361270,项目名称:DuiLib_Redrain,代码行数:16,代码来源:main.cpp

示例4: _tWinMain

int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
	::CoInitialize(NULL);

	CPaintManagerUI::SetInstance(hInstance);
	CPaintManagerUI::SetCurrentPath(CPaintManagerUI::GetInstancePath());
	CPaintManagerUI::SetResourcePath(L"Skin");
	//	CPaintManagerUI::SetResourceZip(_T("Skin.zip"));

	CFrameWnd *pFrame = new CFrameWnd(_T("MainWnd.xml"));
	pFrame->Create(NULL, _T("Redrain°ë͸Ã÷´°Ìådemo"), UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE);
	pFrame->ShowModal();
	delete pFrame;

	::CoUninitialize();
	return 0;
}
开发者ID:greatdiviner,项目名称:DuiLib_Redrain,代码行数:17,代码来源:main.cpp

示例5: _tWinMain

int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
	::OleInitialize(NULL);
    ::CoInitialize(NULL);
	CWkeWebkitUI::WkeWebkit_Init();

    CPaintManagerUI::SetInstance(hInstance);
	CFrameWnd *pFrame = new CFrameWnd(_T("xmls\\Main_dlg.xml"));
    pFrame->Create(NULL, _T("Redrain音乐盒"), UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE);
    pFrame->ShowModal();

	CWkeWebkitUI::WkeWebkit_Shutdown();
    delete pFrame;
    ::CoUninitialize();
	::OleUninitialize();
    return 0;
}
开发者ID:276361270,项目名称:DuiLib_Redrain,代码行数:17,代码来源:main.cpp

示例6: WinMain

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int nCmdShow)
{
    CPaintManagerUI::SetInstance(hInstance);
    CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath() + _T("skin\\FlashRes"));

    HRESULT Hr = ::CoInitialize(NULL);
    if( FAILED(Hr) ) return 0;

    CFrameWnd* pFrame = new CFrameWnd();
    if( pFrame == NULL ) return 0;
    pFrame->Create(NULL, NULL, UI_WNDSTYLE_DIALOG, 0);
    pFrame->CenterWindow();
    pFrame->ShowWindow(true);
    CPaintManagerUI::MessageLoop();

    ::CoUninitialize();
    return 0;
}
开发者ID:pgmsoul,项目名称:duilib,代码行数:18,代码来源:App.cpp

示例7: WinMain

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int nCmdShow)
{
    HRESULT Hr = ::CoInitialize(NULL);
    if( FAILED(Hr) ) return 0;
    HRESULT hRes = ::OleInitialize(NULL);
    // 初始化UI管理器
    CPaintManagerUI::SetInstance(hInstance);
    // 初始化资源
    InitResource();

    CFrameWnd *pFrame = new CFrameWnd(_T("MainWnd.xml"));
    pFrame->Create(NULL, _T("Redrain窗体动画demo"), UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE);
    pFrame->ShowModal();

    delete pFrame;
    ::CoUninitialize();
    return 0;
}
开发者ID:vizcount,项目名称:work,代码行数:18,代码来源:main.cpp

示例8: _tWinMain

int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
    ::CoInitialize(NULL);

	
	
	
	
	

	// xcopy /YEI "D:\work\DuiLib_Redrain\Lib\*.*"  "D:\work\ONERadio\lib"

	

    CPaintManagerUI::SetInstance(hInstance);
	CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath() + _T("skin"));
	//CPaintManagerUI::SetResourcePath(L"skin");
	CFrameWnd *pFrame = new CFrameWnd(_T("Main_dlg.xml"));
	
    pFrame->Create(NULL, _T("HiDPI Demo Window1"), UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE);
	
	
	pFrame->ShowWindow();
	pFrame->setDPI(CDPI::GetMainMonitorDPI());
	pFrame->CenterWindow();



	CFrameWnd *pFrame1 = new CFrameWnd(_T("Main_dlg2.xml"));

	pFrame1->Create(NULL, _T("HiDPI Demo Window2"), UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE);
	pFrame1->ShowWindow();
	::ShowWindow(*pFrame1, SW_HIDE);
	CPaintManagerUI::MessageLoop();


    delete pFrame;
	delete pFrame1;
    ::CoUninitialize();
    return 0;
}
开发者ID:gaodeng,项目名称:DuiLib_Redrain,代码行数:41,代码来源:main.cpp

示例9: InitInstance

	virtual BOOL InitInstance()
	{
		CFrameWnd* pFrame = new CFrameWnd;
		
		CString str = AfxRegisterWndClass( 0, LoadStandardCursor(IDC_IBEAM),
							(HBRUSH)GetStockObject(BLACK_BRUSH), 
							LoadStandardIcon(IDI_WINLOGO));

		pFrame->Create( str,  // 윈도우 클래스..
						"Hello, MFC", 
						WS_OVERLAPPEDWINDOW & ~WS_MAXIMIZEBOX,
						CRect(100,100,200,200), 0, 0,
						WS_EX_TOPMOST); // 확장 윈도우 style

		pFrame->ShowWindow( SW_SHOW );
		pFrame->UpdateWindow( );
		
		m_pMainWnd = pFrame;

		return TRUE;
	}
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:21,代码来源:Hello5.cpp


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