Composite of fixed code for mingw64(on windows) and general fixes for msvc.
1) (win32window) don't convert char to wide, use char direct to window. 2) (CMakeLists) Don't link one library as static CPPLIB and no others (mismatched allocations) 3) (macros) Fix Gwen macros for mingw64 on windows build. (changes are by compiler(msc_ver) not platform) 4) (FileUtils) sprintf_s reference by platform, not compiler (mingw64 support) 5) (b3OpenCLUtils) fix bad define name _MSVC_VER->_MSC_VER 6) (compoundCollision) remove unused variables, simplify operation. 7) (impulseconstraint) remove duplicated code block
This commit is contained in:
@@ -439,15 +439,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
void Win32Window::setWindowTitle(const char* titleChar)
|
||||
{
|
||||
|
||||
wchar_t windowTitle[1024];
|
||||
swprintf(windowTitle, 1024, L"%hs", titleChar);
|
||||
|
||||
#ifdef _WIN64
|
||||
SetWindowTextW(m_data->m_hWnd, windowTitle);
|
||||
SetWindowText(m_data->m_hWnd, titleChar);
|
||||
#else
|
||||
DWORD dwResult;
|
||||
SendMessageTimeoutW(m_data->m_hWnd, WM_SETTEXT, 0,
|
||||
reinterpret_cast<LPARAM>(windowTitle),
|
||||
SendMessageTimeout(m_data->m_hWnd, WM_SETTEXT, 0,
|
||||
reinterpret_cast<LPARAM>(titleChar),
|
||||
SMTO_ABORTIFHUNG, 2000, &dwResult);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user