예제 #1
0
파일: MainFrm.cpp 프로젝트: b1ueb0y/LViewer
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;
}
	BOOL InitInstance()
	{
		CFrameWnd* pFrame = new CFrameWnd;
		pFrame->Create(NULL, L"Hello MFC");
		pFrame->ShowWindow(m_nCmdShow);
		pFrame->UpdateWindow();
		m_pMainWnd = pFrame;
		return TRUE;
	}
예제 #3
0
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;
}
예제 #4
0
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;
}
예제 #5
0
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;
}
예제 #6
0
파일: App.cpp 프로젝트: pgmsoul/duilib
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;
}
예제 #7
0
파일: main.cpp 프로젝트: vizcount/work
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;
}
예제 #8
0
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;
}
예제 #9
0
	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;
	}