diff options
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/activex/SOActiveX.cxx | 20 | ||||
-rw-r--r-- | extensions/source/activex/SOActiveX.h | 2 | ||||
-rw-r--r-- | extensions/source/scanner/scanwin.cxx | 10 |
3 files changed, 16 insertions, 16 deletions
diff --git a/extensions/source/activex/SOActiveX.cxx b/extensions/source/activex/SOActiveX.cxx index 436700851200..304b74812756 100644 --- a/extensions/source/activex/SOActiveX.cxx +++ b/extensions/source/activex/SOActiveX.cxx @@ -39,23 +39,23 @@ #pragma warning (pop) -#define STAROFFICE_WINDOWCLASS "SOParentWindow" +#define STAROFFICE_WINDOWCLASS L"SOParentWindow" void OutputError_Impl( HWND hw, HRESULT ErrorCode ) { - LPTSTR sMessage; - FormatMessageA( + LPWSTR sMessage; + FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, nullptr, ErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - reinterpret_cast<LPTSTR>(&sMessage), + reinterpret_cast<LPWSTR>(&sMessage), 0, nullptr ); - ::MessageBoxA( hw, sMessage, nullptr, MB_OK | MB_ICONINFORMATION ); + MessageBoxW( hw, sMessage, nullptr, MB_OK | MB_ICONINFORMATION ); LocalFree( sMessage ); } @@ -164,17 +164,17 @@ CSOActiveX::CSOActiveX() OutputError_Impl( nullptr, hr ); mPWinClass.style = CS_HREDRAW|CS_VREDRAW; - mPWinClass.lpfnWndProc = ::DefWindowProc; + mPWinClass.lpfnWndProc = DefWindowProcW; mPWinClass.cbClsExtra = 0; mPWinClass.cbWndExtra = 0; - mPWinClass.hInstance = GetModuleHandle(nullptr); //myInstance; + mPWinClass.hInstance = GetModuleHandleW(nullptr); //myInstance; mPWinClass.hIcon = nullptr; mPWinClass.hCursor = nullptr; mPWinClass.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_BACKGROUND); mPWinClass.lpszMenuName = nullptr; mPWinClass.lpszClassName = STAROFFICE_WINDOWCLASS; - RegisterClass(&mPWinClass); + RegisterClassW(&mPWinClass); } CSOActiveX::~CSOActiveX() @@ -991,9 +991,9 @@ HRESULT CSOActiveX::OnDrawAdvanced( ATL_DRAWINFO& di ) } mParentWin = hwnd; - mOffWin = CreateWindow( + mOffWin = CreateWindowW( STAROFFICE_WINDOWCLASS, - "OfficeContainer", + L"OfficeContainer", WS_CHILD | WS_CLIPCHILDREN | WS_BORDER, di.prcBounds->left, di.prcBounds->top, diff --git a/extensions/source/activex/SOActiveX.h b/extensions/source/activex/SOActiveX.h index 14451fcdbf51..5f652e6b6752 100644 --- a/extensions/source/activex/SOActiveX.h +++ b/extensions/source/activex/SOActiveX.h @@ -90,7 +90,7 @@ protected: OLECHAR const * mCurFileUrl; BOOL mbLoad; BOOL mbViewOnly; - WNDCLASS mPWinClass; + WNDCLASSW mPWinClass; HWND mParentWin; HWND mOffWin; diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index 117e8d55f80e..437b408a6918 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -127,7 +127,7 @@ static ImpTwain* pImpTwainInstance = nullptr; LRESULT CALLBACK TwainWndProc( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM nPar2 ) { - return DefWindowProc( hWnd, nMsg, nPar1, nPar2 ); + return DefWindowProcW( hWnd, nMsg, nPar1, nPar2 ); } LRESULT CALLBACK TwainMsgProc( int nCode, WPARAM wParam, LPARAM lParam ) @@ -235,11 +235,11 @@ ImpTwain::ImpTwain( ScannerManager& rMgr, const Link<unsigned long,void>& rNotif strncpy( aAppIdent.ProductName, "Office", 32 ); aAppIdent.ProductName[32] = aAppIdent.ProductName[33] = 0; - WNDCLASS aWc = { 0, &TwainWndProc, 0, sizeof( WNDCLASS ), GetModuleHandle( nullptr ), nullptr, nullptr, nullptr, nullptr, "TwainClass" }; - RegisterClass( &aWc ); + WNDCLASSW aWc = { 0, &TwainWndProc, 0, sizeof( WNDCLASSW ), GetModuleHandleW( nullptr ), nullptr, nullptr, nullptr, nullptr, L"TwainClass" }; + RegisterClassW( &aWc ); - hTwainWnd = CreateWindowEx( WS_EX_TOPMOST, aWc.lpszClassName, "TWAIN", 0, 0, 0, 0, 0, HWND_DESKTOP, nullptr, aWc.hInstance, nullptr ); - hTwainHook = SetWindowsHookEx( WH_GETMESSAGE, &TwainMsgProc, nullptr, GetCurrentThreadId() ); + hTwainWnd = CreateWindowExW( WS_EX_TOPMOST, aWc.lpszClassName, L"TWAIN", 0, 0, 0, 0, 0, HWND_DESKTOP, nullptr, aWc.hInstance, nullptr ); + hTwainHook = SetWindowsHookExW( WH_GETMESSAGE, &TwainMsgProc, nullptr, GetCurrentThreadId() ); // block destruction until ImplDestroyHdl is called mxSelfRef = static_cast< ::cppu::OWeakObject* >( this ); |