duWindowManager *WINAPI LoadResourceStyleZipW(LPCWSTR lpszZipData,ULONG nResZipSize, LPCSTR lpszZipPassword) { ::CoInitialize(NULL); RegisterMenuClass(); duWindowManager *pWinManager = new duWindowManager; if (pWinManager) { if (pWinManager->OpenSkinZip(lpszZipData, lpszZipPassword)) return pWinManager; } return pWinManager; }
duWindowManager *WINAPI LoadStyleA(const char *lpszXml) { if (!lpszXml || !*lpszXml) return NULL; RegisterMenuClass(); int len = (int)strlen(lpszXml); wchar_t *lpwXml = new wchar_t[len+1]; ZeroMemory(lpwXml, (len+1) * sizeof(wchar_t)); ::MultiByteToWideChar(CP_ACP, NULL, lpszXml, len, lpwXml, len+1); duWindowManager *pWinManager = LoadStyleW(lpwXml); delete [] lpwXml; return pWinManager; }
duWindowManager* WINAPI LoadStyleZipA(LPCSTR lpszZip, LPCSTR lpszZipPassword) { if (!lpszZip || !*lpszZip) return NULL; RegisterMenuClass(); int len = (int)strlen(lpszZip); wchar_t *lpwZip = new wchar_t[len+1]; ZeroMemory(lpwZip, (len+1) * sizeof(wchar_t)); ::MultiByteToWideChar(CP_ACP, NULL, lpszZip, len, lpwZip, len+1); duWindowManager *pWinManager = LoadStyleZipW(lpwZip, lpszZipPassword); delete [] lpwZip; return pWinManager; }
duWindowManager *WINAPI LoadStyleW(const wchar_t *lpszXml) { if (!lpszXml || !*lpszXml) return NULL; ::CoInitialize(NULL); RegisterMenuClass(); duWindowManager *pWinManager = new duWindowManager; if (pWinManager) { if (pWinManager->OpenSkin(lpszXml)) return pWinManager; } return pWinManager; }
duWindowManager *WINAPI LoadStyleZipW(LPCWSTR lpszZip, LPCSTR lpszZipPassword) { if (!lpszZip || !*lpszZip) return NULL; ::CoInitialize(NULL); RegisterMenuClass(); duWindowManager *pWinManager = new duWindowManager; if (pWinManager) { if (pWinManager->OpenSkinZip(lpszZip, lpszZipPassword)) return pWinManager; } return pWinManager; }
duWindowManager *WINAPI LoadStyleZipMemory(BYTE *pData, int nSize) { if (!pData || nSize <= 0) return NULL; ::CoInitialize(NULL); RegisterMenuClass(); void *p = NULL; duWindowManager *pWinManager = new duWindowManager; if (pWinManager) { if (pWinManager->OpenSkinMemory(pData, nSize)) return pWinManager; } return pWinManager; }
/* * FirstInstInit - register classes and do other initializiation that * is only done by the first instance of the spy */ static BOOL FirstInstInit( void ) { WNDCLASS wc; /* fixed window */ wc.style = 0L; wc.lpfnWndProc = MainWndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 4; wc.hInstance = Instance; wc.hIcon = NULL; wc.hCursor = LoadCursor( NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); wc.lpszMenuName = "RESTEST_MENU"; wc.lpszClassName = MAIN_CLASS; if( !RegisterClass( &wc ) ) return( FALSE ); if( !RegisterMenuClass() ) return( FALSE ); if( !RegisterBitmapClass() ) return( FALSE ); return( TRUE ); }