예제 #1
0
파일: TextBox.cpp 프로젝트: mygaldre/mmsstv
HANDLE mcmCreateObject(LPCBYTE pStorage, DWORD Size)
{
	CItem *pItem = new CItem;
	ASSERT(pItem);
	if( pItem != NULL ) pItem->Create(pStorage, Size);
	return (HANDLE)pItem;
}
예제 #2
0
파일: TextBox.cpp 프로젝트: mygaldre/mmsstv
//---------------------------------------------------------------------------
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
0
파일: qslbox.cpp 프로젝트: mygaldre/mmsstv
//---------------------------------------------------------------------------
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
0
파일: TextArt.cpp 프로젝트: mygaldre/mmsstv
//---------------------------------------------------------------------------
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;
}