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