HESCHEME ESTDCALL CreateColorScheme (LPSCHEMECOLORBASE lpc, UINT uExtraInfoLength) { LPESCHEME lpScheme; LPCOLORSCHEMEINFO lpsi; // Create color scheme info lpsi = new COLORSCHEMEINFO; lpsi->cbSize = sizeof(COLORSCHEMEINFO); lpsi->uUserCount = uExtraInfoLength; if ((lpsi->lpsc = new SCHEMECOLORSTRUCT) == NULL) { delete lpsi; return NULL; } lpsi->lpsc->cbSize = sizeof(SCHEMECOLORSTRUCT); // Create scheme color mask if (uExtraInfoLength) { if ((lpsi->lpadwMask = new DWORD [uExtraInfoLength]) == NULL) { delete lpsi->lpsc; delete lpsi; return NULL; } } else { lpsi->lpadwMask = NULL; } // Create the scheme if ((lpScheme = _CreateScheme(SCHEMES_COLORSCHEME, 0, (LPVOID)lpsi, uExtraInfoLength)) == NULL) { delete [uExtraInfoLength] lpsi->lpadwMask; _DestroyColorSchemeColors(lpsi); delete lpsi->lpsc; delete lpsi; return NULL; } lpsi->lpScheme = lpScheme;
HESCHEME ESTDCALL CreateUserScheme (LPVOID lpSchemeData, UINT uSchemeUserType, UINT nExtraSchemeData) { return (HESCHEME)_CreateScheme(SCHEMES_USERSCHEME, uSchemeUserType, lpSchemeData, nExtraSchemeData); }