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


C++ CreateEx函数代码示例

本文整理汇总了C++中CreateEx函数的典型用法代码示例。如果您正苦于以下问题:C++ CreateEx函数的具体用法?C++ CreateEx怎么用?C++ CreateEx使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: ASSERT

//Create Tool Tip
BOOL CToolTip2::Create(CWnd* pParentWnd)
{
	ASSERT(this != NULL );
	ASSERT(pParentWnd != NULL);

	m_pParentWnd = pParentWnd;
	//Create font
	m_font.CreateFont(15, 0, 0, 0, FW_REGULAR, 0, 0, 0, 0, 0, 0, 0, 0, "MS Sans Serif");
	CRect rectInitialSize(0,0,0,0);//Initial Window size. Will be dynamically changed later.
	return CreateEx(WS_EX_TOOLWINDOW , NULL, NULL,WS_POPUP |  WS_CHILD | WS_CLIPSIBLINGS,
		rectInitialSize,pParentWnd, NULL, NULL);
}
开发者ID:deNULL,项目名称:seman,代码行数:13,代码来源:tooltip2.cpp

示例2: ASSERT_VALID

BOOL CTitleTip::Create(CWnd * pParentWnd)
{
	ASSERT_VALID(pParentWnd);

	DWORD dwStyle   =   WS_POPUP; 
	DWORD dwExStyle =   WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
	m_pParentWnd    =   pParentWnd;

	return CreateEx(dwExStyle, TITLETIP_CLASSNAME, NULL, dwStyle, 
                    CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 
		            NULL, NULL, NULL );
}
开发者ID:modmanmatt,项目名称:blackcats-mirc,代码行数:12,代码来源:TitleTip.cpp

示例3: CreateEx

BOOL CSplashWnd::Create(CWnd* pParentWnd /*= NULL*/)
{
	if (!m_bitmap.LoadBitmap(IDB_SPLASH))
		return FALSE;

	BITMAP bm;
	m_bitmap.GetBitmap(&bm);

	return CreateEx(0,
		AfxRegisterWndClass(0, AfxGetApp()->LoadStandardCursor(IDC_ARROW)),
		NULL, WS_POPUP | WS_VISIBLE, 0, 0, bm.bmWidth, bm.bmHeight, pParentWnd->GetSafeHwnd(), NULL);
}
开发者ID:BlueAndi,项目名称:vscp_software,代码行数:12,代码来源:Splash.cpp

示例4: Create

BOOL CXTPDockingPaneSidePanel::Create(CRect rc)
{
	if (m_hWnd)
		return TRUE;

	if (!CreateEx(0, _T("XTPDockingPaneSidePanel"), _T(""), WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_CHILD, rc, GetDockingPaneManager()->GetSite(), 0))
	{
		return FALSE;
	}
	m_pCaptionButtons->CheckForMouseOver(CPoint(-1, -1));

	return TRUE;
}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:13,代码来源:XTPDockingPaneSidePanel.cpp

示例5: Create

// The Create for simple top level windows.
HWND JWnd :: Create ( LPCTSTR szName , DWORD dwStyle )
{
    return ( CreateEx ( 0             ,
                        JWNDDEFCLASS  ,
                        szName        ,
                        dwStyle       ,
                        CW_USEDEFAULT ,
                        CW_USEDEFAULT ,
                        CW_USEDEFAULT ,
                        CW_USEDEFAULT ,
                        NULL          ,
                        NULL           ) ) ;
}
开发者ID:xahgo,项目名称:tama,代码行数:14,代码来源:JWnd.cpp

示例6: ASSERT

//创建窗口
VOID CLayeredWindow::CreateLayered(CWnd * pWndControl, CRect & rcWindow)
{
	//效验参数
	ASSERT((pWndControl!=NULL)&&(pWndControl->m_hWnd!=NULL));
	if ((pWndControl==NULL)||(pWndControl->m_hWnd==NULL)) return;

	//设置变量
	m_pWndControl=pWndControl;

	//创建窗口
	CreateEx(WS_EX_LAYERED,TEXT("STATIC"),TEXT(""),0,rcWindow,pWndControl,0L);

	return;
}
开发者ID:HuugY,项目名称:MFC_Project,代码行数:15,代码来源:LayeredWindow.cpp

示例7: Create

BOOL CToolBarEx::Create( CWnd* pParentWnd, DWORD dwStyle, UINT nID /*=AFX_IDW_TOOLBAR*/ )
{
    if ( !CreateEx( pParentWnd,
            TBSTYLE_FLAT | TBSTYLE_TRANSPARENT | TBSTYLE_TOOLTIPS,
            dwStyle & ~CBRS_TOOLTIPS, CRect( 0, 0, 0, 0 ), nID ) )
    {
        return FALSE;
    }

    GetToolBarCtrl().SetExtendedStyle(
        TBSTYLE_EX_DRAWDDARROWS | TBSTYLE_EX_HIDECLIPPEDBUTTONS );

    return TRUE;
}
开发者ID:moodboom,项目名称:Reusable,代码行数:14,代码来源:ToolBarEx.cpp

示例8: CreateEx

BOOL CSplashScreen::Create(CWnd* pParentWnd /*= nullptr*/)
{
    BOOL bResult = FALSE;
    if (m_ouBitMapImage.LoadBitmap(IDR_BMP_SPLASH_SCREEN) == TRUE)
    {
        BITMAP BitMap;
        m_ouBitMapImage.GetBitmap(&BitMap);

        bResult = CreateEx(0,
                           AfxRegisterWndClass(0, AfxGetApp()->LoadStandardCursor(IDC_ARROW)),
                           nullptr, WS_POPUP | WS_VISIBLE, 0, 0, BitMap.bmWidth, BitMap.bmHeight, pParentWnd->GetSafeHwnd(), nullptr);
    }
    return bResult;
}
开发者ID:BlackVodka,项目名称:busmaster,代码行数:14,代码来源:Splash.cpp

示例9: AfxRegisterWndClass

BOOL CMainFrame::Create(DWORD dwExStyle, DWORD dwStyle, const RECT& rect, 
	CWnd* pParentWnd, UINT nID, CCreateContext* pContext) 
{
	LPCTSTR m_lpszClassName;

  	m_lpszClassName = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW,
		LoadCursor(NULL, IDC_ARROW), 
		(HBRUSH)(COLOR_WINDOW+1), NULL);

	// TODO: Add your specialized code here and/or call the base class
	return CreateEx(dwExStyle, m_lpszClassName, _T(""), dwStyle, 
		rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, 
		pParentWnd->GetSafeHwnd(), NULL, NULL );
}
开发者ID:Kalamatee,项目名称:RayStorm,代码行数:14,代码来源:Mainfrm.cpp

示例10: AfxRegisterWndClass

CTipWnd::CTipWnd(signed char opt /*=-1*/, UINT fmt /*=DT_NOCLIP|DT_NOPREFIX|DT_EXPANDTABS*/)
{
	static CString strClass;
	if (strClass.IsEmpty())
	{
		// Register window class
		strClass = AfxRegisterWndClass(0);
		ASSERT(!strClass.IsEmpty());
	}

	m_opt_page = opt;

	m_hovering = m_visible = m_down = false;
	m_fmt = fmt;
	m_margins = CSize(2, 2);
	m_bg_colour = ::GetSysColor(COLOR_INFOBK);
	m_text_colour = ::GetSysColor(COLOR_INFOTEXT);
	m_stock_font = ANSI_VAR_FONT;
	m_alpha = 255;

	m_in = m_out = false;

	// Check if we can do transparent window
	if (m_2k == -1)
	{
		OSVERSIONINFO osvi;
		osvi.dwOSVersionInfoSize = sizeof(osvi);
		GetVersionEx(&osvi);

		// Work out if this is Windows 200 or better
		m_2k = (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT && osvi.dwMajorVersion >= 5);

		// If W2K then get pointer to SetLayeredWindowAttributes
		HINSTANCE hh;
		if (m_2k && (hh = ::LoadLibrary("USER32.DLL")) != HINSTANCE(0))
			m_pSLWAfunc = (PFSetLayeredWindowAttributes)::GetProcAddress(hh, "SetLayeredWindowAttributes");
	}

	DWORD exStyle = WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
	if (m_2k)
		exStyle |= WS_EX_LAYERED;  // This allows a transparent window

	VERIFY(CreateEx(exStyle,
					strClass, NULL,
					WS_POPUP | WS_BORDER,
					0, 0, 0, 0,
					NULL, (HMENU)0));

	ASSERT(m_hWnd != (HWND)0);
}
开发者ID:AndrewWPhillips,项目名称:HexEdit,代码行数:50,代码来源:TipWnd.cpp

示例11: AfxRegisterWndClass

CPlVodWnd::CPlVodWnd(HWND hParent, UINT nID)
//: CPlWnd(hParent, nID)
{
	m_hParent = hParent;
	LPCTSTR lpWndClass = AfxRegisterWndClass(CS_DBLCLKS, 
											NULL,
											(HBRUSH)GetStockObject(BLACK_BRUSH),
											0);
	CString wndName;
	wndName.Format("Vod Player Window:%d",nID);
	CreateEx(NULL,lpWndClass,wndName,
		WS_CHILD | WS_VISIBLE | WS_BORDER | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 
		0,0,0,0, hParent ,(HMENU)nID);	
}
开发者ID:dulton,项目名称:jorhy-prj,代码行数:14,代码来源:pl_vod_wnd.cpp

示例12: AfxFindResourceHandle

BOOL CFrameWnd::Create( LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle,
                        const RECT &rect, CWnd *pParentWnd, LPCTSTR lpszMenuName,
                        DWORD dwExStyle, CCreateContext *pContext )
/*****************************************************************/
{
    if( lpszMenuName != NULL ) {
        HINSTANCE hInstance = AfxFindResourceHandle( lpszMenuName, RT_MENU );
        m_hMenuDefault = ::LoadMenu( hInstance, lpszMenuName );
    } else {
        m_hMenuDefault = NULL;
    }
    return( CreateEx( dwExStyle, lpszClassName, lpszWindowName, dwStyle, rect,
                      pParentWnd, (UINT)m_hMenuDefault, pContext ) );
}
开发者ID:ArmstrongJ,项目名称:open-watcom-v2,代码行数:14,代码来源:framewnd.cpp

示例13: CreateEx

/////////////////////////////////////////////////////////////////////////////
// COpenScreenWnd message handlers
void COpenScreenWnd::CreatScreenWnd()
{
	//建立大小与位图大小相同的窗口
	CreateEx(0,AfxRegisterWndClass(0,AfxGetApp()->LoadStandardCursor(IDC_ARROW)),
		"ImageScreen",
		WS_POPUP,
		0,
		0,
		m_bm.bmWidth,
		m_bm.bmHeight,
		NULL,
		NULL,
		NULL );
}
开发者ID:ustcdane,项目名称:Npcas,代码行数:16,代码来源:OpenScreenWnd.cpp

示例14: ASSERT

/////////////////////////////////////////////////////////////////////
// 
// CXInfoTip::Create()
// 
// DESCRIPTION
//     
//		Creates the tip window
//
// RETURNS
//
//		[BOOL]			- TRUE on success, FALSE on failure
//
// PARAMETERS
//
//		[pParentWnd]	- Pointer to parent window
//     
/////////////////////////////////////////////////////////////////////
BOOL CXInfoTip::Create(CWnd* pParentWnd) 
{
	BOOL	bSuccess;

	// Must have a parent
	ASSERT(pParentWnd != NULL);

	bSuccess = CreateEx(NULL, m_szClass, NULL, WS_POPUP, 0, 0, 0, 0, pParentWnd->GetSafeHwnd(), NULL, NULL);

	// Use default GUI font for default font
	m_pFont = CFont::FromHandle((HFONT)::GetStockObject(DEFAULT_GUI_FONT));

	return bSuccess;
}
开发者ID:RNCan,项目名称:WeatherBasedSimulationFramework,代码行数:31,代码来源:XInfoTip.cpp

示例15: ASSERT

BOOL COXTabViewContainer::Create(CWnd* pParentWnd, CRect rect/*=CRect(0,0,0,0)*/,
								 DWORD dwStyle/*=WS_CHILD|WS_VISIBLE*/, 
								 UINT nID/*=AFX_IDW_PANE_FIRST*/)
{
	ASSERT(pParentWnd != NULL);
	ASSERT(dwStyle & WS_CHILD);
	ASSERT(nID != 0);

	// the Windows scroll bar styles bits turn on the smart scrollbars
	DWORD dwCreateStyle=dwStyle&~(WS_HSCROLL|WS_VSCROLL);
	dwCreateStyle&=~WS_BORDER;

	dwCreateStyle|=WS_CHILD;

	// define our own window class 
	WNDCLASS wndClass;
	wndClass.style=CS_DBLCLKS; 
    wndClass.lpfnWndProc=AfxWndProc; 
    wndClass.cbClsExtra=0; 
    wndClass.cbWndExtra=0; 
    wndClass.hInstance=AfxGetInstanceHandle(); 
    wndClass.hIcon=0; 
    wndClass.hCursor=::LoadCursor(NULL,IDC_ARROW); 
    wndClass.hbrBackground=(HBRUSH)(COLOR_BTNFACE+1); 
    wndClass.lpszMenuName=NULL; 
	wndClass.lpszClassName=_T("TabViewContainer");
	
	if(!AfxRegisterClass(&wndClass))
		return FALSE;

	if (!CreateEx(WS_EX_CLIENTEDGE,wndClass.lpszClassName,NULL,
		dwCreateStyle,rect.left,rect.top,rect.Width(),rect.Height(),
		pParentWnd->m_hWnd,(HMENU)(INT_PTR)nID,NULL))
	{
		return FALSE;       // create invisible
	}

	// remove WS_EX_CLIENTEDGE style from parent window
	pParentWnd->ModifyStyleEx(WS_EX_CLIENTEDGE, 0, SWP_DRAWFRAME);

	// sign 
	::SetWindowLongPtr(GetSafeHwnd(),GWL_USERDATA,ID_TABVIEWCONTAINER_SIGN);

	SetScrollStyle(0,TRUE);

	CalcLayout();

	return TRUE;
}
开发者ID:leonwang9999,项目名称:testcode,代码行数:49,代码来源:OXTabView.cpp


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