mirror of
https://github.com/reactos/reactos.git
synced 2025-05-23 19:14:48 +00:00
[SDK][ATL] Use CStringW in CImage
This commit is contained in:
parent
ad319ef944
commit
03854056a2
1 changed files with 2 additions and 16 deletions
|
@ -377,14 +377,7 @@ public:
|
||||||
HRESULT Load(LPCTSTR pszFileName) throw()
|
HRESULT Load(LPCTSTR pszFileName) throw()
|
||||||
{
|
{
|
||||||
// convert the file name string into Unicode
|
// convert the file name string into Unicode
|
||||||
// TODO: use a string class
|
CStringW pszNameW(pszFileName);
|
||||||
#ifdef UNICODE
|
|
||||||
LPCWSTR pszNameW = pszFileName;
|
|
||||||
#else
|
|
||||||
WCHAR szPath[MAX_PATH];
|
|
||||||
::MultiByteToWideChar(CP_ACP, 0, pszFileName, -1, szPath, MAX_PATH);
|
|
||||||
LPCWSTR pszNameW = szPath;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// create a GpBitmap object from file
|
// create a GpBitmap object from file
|
||||||
using namespace Gdiplus;
|
using namespace Gdiplus;
|
||||||
|
@ -555,14 +548,7 @@ public:
|
||||||
// TODO & FIXME: set parameters (m_rgbTransColor etc.)
|
// TODO & FIXME: set parameters (m_rgbTransColor etc.)
|
||||||
|
|
||||||
// convert the file name string into Unicode
|
// convert the file name string into Unicode
|
||||||
// TODO: use a string class
|
CStringW pszNameW(pszFileName);
|
||||||
#ifdef UNICODE
|
|
||||||
LPCWSTR pszNameW = pszFileName;
|
|
||||||
#else
|
|
||||||
WCHAR szPath[MAX_PATH];
|
|
||||||
::MultiByteToWideChar(CP_ACP, 0, pszFileName, -1, szPath, MAX_PATH);
|
|
||||||
LPCWSTR pszNameW = szPath;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// if the file type is null, get the file type from extension
|
// if the file type is null, get the file type from extension
|
||||||
const GUID *FileType = &guidFileType;
|
const GUID *FileType = &guidFileType;
|
||||||
|
|
Loading…
Reference in a new issue