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


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

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


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

示例1: mcmCreateObject

HANDLE mcmCreateObject(LPCBYTE pStorage, DWORD Size)
{
	CItem *pItem = new CItem;
	ASSERT(pItem);
	if( pItem != NULL ) pItem->Create(pStorage, Size);
	return (HANDLE)pItem;
}
开发者ID:mygaldre,项目名称:mmsstv,代码行数:7,代码来源:TextBox.cpp

示例2: DllEntryPoint

//---------------------------------------------------------------------------
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*)
{
	switch(reason){
		case DLL_PROCESS_ATTACH:
			{
				InitSys();

				char bf[512];
				::GetModuleFileName(hinst, bf, sizeof(bf));
				::SetDirName(sys.m_BgnDir, bf);

				_setmbcp(_MB_CP_ANSI);
				HWND hMM = ::FindWindow("TMmsstv", NULL);
				if( hMM != NULL ) Application->Handle = hMM;

                if( sys.m_BitPixel < 24 ){
					sys.m_pBitmapTemp = new Graphics::TBitmap;
					sys.m_pBitmapTemp->Width = 1;
            		sys.m_pBitmapTemp->Height = 1;
                }
			}
			break;
		case DLL_PROCESS_DETACH:
			sys.m_fMultProc = NULL;
			if( sys.m_pDefStg != NULL ){
				CItem *pItem = new CItem;
				pItem->Create(NULL, 0);
				pItem->SaveToInifile("Default", ININAME);
				delete pItem;
				delete sys.m_pDefStg;
				sys.m_pDefStg = NULL;
			}
			if( sys.m_pTextList != NULL ){
				SaveStringsToIniFile(sys.m_pTextList, "Strings", ININAME, TRUE);
				delete sys.m_pTextList;
				sys.m_pTextList = NULL;
			}
			if( sys.m_pStyleList != NULL ){
				SaveStringsToIniFile(sys.m_pStyleList, "Styles", ININAME, FALSE);
				delete sys.m_pStyleList;
				sys.m_pStyleList = NULL;
			}
            if( sys.m_pFontList != NULL ){
				delete sys.m_pFontList;
                sys.m_pFontList = NULL;
            }
            if( sys.m_pBitmapTemp != NULL ){
				delete sys.m_pBitmapTemp;
                sys.m_pBitmapTemp = NULL;
            }
			break;
	}
	return 1;
}
开发者ID:mygaldre,项目名称:mmsstv,代码行数:55,代码来源:TextBox.cpp

示例3: DllEntryPoint

//---------------------------------------------------------------------------
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*)
{
	switch(reason){
		case DLL_PROCESS_ATTACH:
			{
				memset(&sys, 0, sizeof(sys));

				sys.m_dwVersion = ::GetVersion();
				sys.m_WinNT = (sys.m_dwVersion < 0x80000000) ? TRUE : FALSE;
				sys.m_CodePage = ::GetACP();	// Get codepage

				char bf[512];
				::GetModuleFileName(hinst, bf, sizeof(bf));
				::SetDirName(sys.m_BgnDir, bf);

				HDC hdcScreen = ::CreateDC("DISPLAY", NULL, NULL, NULL);
				sys.m_BitPixel = ::GetDeviceCaps(hdcScreen, BITSPIXEL);
				::DeleteDC(hdcScreen);

				_setmbcp(_MB_CP_ANSI);
			}
			break;
		case DLL_PROCESS_DETACH:
			sys.m_fMultProc = NULL;
			if( sys.m_pDefStg != NULL ){
				CItem *pItem = new CItem;
				pItem->Create(NULL, 0);
				pItem->SaveToInifile("Default", ININAME);
				delete pItem;
				delete sys.m_pDefStg;
				sys.m_pDefStg = NULL;
			}
			if( sys.m_pTextList != NULL ){
				SaveStringsToIniFile(sys.m_pTextList, "Strings", ININAME);
				delete sys.m_pTextList;
				sys.m_pTextList = NULL;
			}
			if( sys.m_pStyleList != NULL ){
				SaveStringsToIniFile(sys.m_pStyleList, "Styles", ININAME);
				delete sys.m_pStyleList;
				sys.m_pStyleList = NULL;
			}
			break;
	}
	return 1;
}
开发者ID:mygaldre,项目名称:mmsstv,代码行数:47,代码来源:qslbox.cpp

示例4: DllEntryPoint

//---------------------------------------------------------------------------
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*)
{
	switch(reason){
		case DLL_PROCESS_ATTACH:
			{
				InitSys(hinst);

				_setmbcp(_MB_CP_ANSI);
				HWND hMM = ::FindWindow("TMmsstv", NULL);
				if( hMM != NULL ) Application->Handle = hMM;
			}
			break;
		case DLL_PROCESS_DETACH:
			sys.m_fMultProc = NULL;
			if( sys.m_pDefStg != NULL ){
				CItem *pItem = new CItem;
				pItem->Create(NULL, 0);
				pItem->SaveToInifile("Default", ININAME, FALSE);
				delete pItem;
				delete sys.m_pDefStg;
				sys.m_pDefStg = NULL;
			}
			if( sys.m_pTextList != NULL ){
				SaveStringsToIniFile(sys.m_pTextList, "Strings", ININAME, TRUE);
				delete sys.m_pTextList;
				sys.m_pTextList = NULL;
			}
			if( sys.m_pStyleList != NULL ){
				SaveStringsToIniFile(sys.m_pStyleList, "Styles", ININAME, FALSE);
				delete sys.m_pStyleList;
				sys.m_pStyleList = NULL;
			}
            if( sys.m_pFontList != NULL ){
				delete sys.m_pFontList;
                sys.m_pFontList = NULL;
            }
            if( sys.m_pBitmapTemp != NULL ){
				delete sys.m_pBitmapTemp;
                sys.m_pBitmapTemp = NULL;
            }
			break;
	}
	return 1;
}
开发者ID:mygaldre,项目名称:mmsstv,代码行数:45,代码来源:TextArt.cpp


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