00001 /* 00002 Free Download Manager Copyright (c) 2003-2007 FreeDownloadManager.ORG 00003 Open Download Manager Copyright (c) 2008-2010 OpenDownloadManager.ORG 00004 */ 00005 00006 #include "stdafx.h" 00007 #include "FdmApp.h" 00008 #include "vmsUploadsDllCaller.h" 00009 #include "inetutil.h" 00010 #include "mfchelp.h" 00011 00012 #ifdef _DEBUG 00013 #undef THIS_FILE 00014 static char THIS_FILE[]=__FILE__; 00015 #define new DEBUG_NEW 00016 #endif 00017 00018 vmsUploadsDllCaller::vmsUploadsDllCaller() 00019 { 00020 00021 } 00022 00023 vmsUploadsDllCaller::~vmsUploadsDllCaller() 00024 { 00025 00026 } 00027 00028 LPCSTR vmsUploadsDllCaller::GetTranslatedString(int nId) 00029 { 00030 return LS (nId); 00031 } 00032 00033 vmsUploadsDll::vmsDllCallerSettings* vmsUploadsDllCaller::GetSettings() 00034 { 00035 return &m_stgs; 00036 } 00037 00038 void vmsUploadsDllCaller::IRToStr(int ir, char *sz, UINT cch) 00039 { 00040 fsIRToStr ((fsInternetResult)ir, sz, cch); 00041 } 00042 00043 HBITMAP vmsUploadsDllCaller::GetBitmap(vmsUploadsDll::vmsWhichBitmap enBmp) 00044 { 00045 UINT nId = 0; 00046 BOOL bCheckAlpha = FALSE; 00047 00048 switch (enBmp) 00049 { 00050 case vmsUploadsDll::BMP_FOR_UPLOADSMENU: 00051 bCheckAlpha = _SkinMgr.tbUseAlpha_ForAllPluginMenuImages (); 00052 nId = IDB_TOOL_DLD_16; break; 00053 00054 case vmsUploadsDll::BMP_FOR_UPLOADSMENU_D: 00055 bCheckAlpha = _SkinMgr.tbUseAlpha_ForAllPluginMenuImages (); 00056 nId = IDB_TOOL_DLD_16_D; break; 00057 00058 case vmsUploadsDll::BMP_FOR_TASKSLIST: 00059 nId = IDB_DOWNLOADSTASKS; break; 00060 00061 case vmsUploadsDll::BMP_FOR_TASKSLIST_SEL: 00062 nId = IDB_DOWNLOADSTASKS_SEL; break; 00063 00064 case vmsUploadsDll::BMP_FOR_LOGLIST: 00065 nId = IDB_LOGSTATES; break; 00066 } 00067 00068 HBITMAP hbm = SBMP (nId); 00069 00070 if (bCheckAlpha && _TB_USE_ALPHA) 00071 { 00072 CBitmap bmp; bmp.Attach (hbm); 00073 ConvertBmp32WithAlphaToBmp32WithoutAlpha (bmp, GetSysColor (COLOR_MENU)); 00074 hbm = (HBITMAP)bmp.Detach (); 00075 } 00076 00077 return hbm; 00078 } 00079 00080 vmsUploadsDll::vmsDllPersist* vmsUploadsDllCaller::GetPersist() 00081 { 00082 return &m_persist; 00083 } 00084 00085 void vmsUploadsDllCaller::GetDataFilePath(LPCSTR pszName, LPSTR pszResult) 00086 { 00087 lstrcpy (pszResult, fsGetDataFilePath (pszName)); 00088 } 00089 00090 void vmsUploadsDllCaller::GetCommonFilesFolder(LPSTR psz) 00091 { 00092 lstrcpy (psz, fsGetFumProgramFilesFolder ()); 00093 } 00094 00095 BOOL vmsUploadsDllCaller::OnBeforeUpload(LPSTR, bool*) 00096 { 00097 return TRUE; 00098 } 00099 00100 vmsUploadsDll::vmsDllCallerEx* vmsUploadsDllCaller::GetExtendedFeatures() 00101 { 00102 return NULL; 00103 }
1.5.6