diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp b/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp index b87387595b..028c275406 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp @@ -61,7 +61,7 @@ namespace ui { s_hInstance = ::GetModuleHandleW(nullptr); - s_prevCocosWndProc = (WNDPROC)SetWindowLongPtrW(s_hwndCocos, GWL_WNDPROC, (LONG_PTR)hookGLFWWindowProc); + s_prevCocosWndProc = (WNDPROC)SetWindowLongPtrW(s_hwndCocos, GWLP_WNDPROC, (LONG_PTR)hookGLFWWindowProc); } EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) @@ -98,7 +98,7 @@ namespace ui { { if (_hwndEdit) { - SetWindowLongPtrW(_hwndEdit, GWL_WNDPROC, (LONG_PTR)_prevWndProc); + SetWindowLongPtrW(_hwndEdit, GWLP_WNDPROC, (LONG_PTR)_prevWndProc); ::DestroyWindow(_hwndEdit); _hasFocus = false; _changedTextManually = false; @@ -125,8 +125,8 @@ namespace ui { s_hInstance, this); // pointer not needed - SetWindowLongPtrW(_hwndEdit, GWL_USERDATA, (LONG_PTR)this); - _prevWndProc = (WNDPROC)SetWindowLongPtrW(_hwndEdit, GWL_WNDPROC, (LONG_PTR)WindowProc); + SetWindowLongPtrW(_hwndEdit, GWLP_USERDATA, (LONG_PTR)this); + _prevWndProc = (WNDPROC)SetWindowLongPtrW(_hwndEdit, GWLP_WNDPROC, (LONG_PTR)WindowProc); ::SendMessageW(_hwndEdit, EM_LIMITTEXT, this->_maxLength, 0); s_previousFocusWnd = s_hwndCocos; diff --git a/extensions/ImGuiEXT/CCImGuiEXT.cpp b/extensions/ImGuiEXT/CCImGuiEXT.cpp index cfd2378e7f..7edabc470c 100644 --- a/extensions/ImGuiEXT/CCImGuiEXT.cpp +++ b/extensions/ImGuiEXT/CCImGuiEXT.cpp @@ -201,7 +201,7 @@ void ImGuiEXT::loadCustomFonts(void* ud) auto fontData = FileUtils::getInstance()->getDataFromFile(fontInfo.first); CCASSERT(!fontData.isNull(), "Cannot load font for IMGUI"); - long bufferSize = 0; + ssize_t bufferSize = 0; auto* buffer = fontData.takeBuffer(&bufferSize); // Buffer automatically freed by IMGUI imFonts->AddFontFromMemoryTTF(buffer, bufferSize, fontInfo.second.fontSize * contentZoomFactor, nullptr, imChars);