本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}