adjust debug condition

This commit is contained in:
fanlumaster committed 2025-03-22 16:47:43 +08:00
1 parent aa7b258a8a
commit 34607abe68
3 files changed
+24 -7

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"Debug snippets": {
"scope": "c,cpp",
"prefix": "fdebug",
"prefix": "dbug",
"body": [
"#ifdef FANY_DEBUG",
"#endif",
+12 -3
View File
@@ -1075,11 +1075,20 @@ VOID CCandidateListUIPresenter::_LayoutChangeNotification(_In_ RECT *lpRect)
cds.dwData = 0;
cds.cbData = sizeof(POINT);
cds.lpData = &Global::PointDTO;
if (!SendMessage(UIHwnd, WM_COPYDATA, (WPARAM)UIHwnd, (LPARAM)&cds))
LRESULT result = SendMessage(UIHwnd, WM_COPYDATA, (WPARAM)UIHwnd, (LPARAM)&cds);
if (result == 0)
{
DWORD error = GetLastError();
std::wstring errorString = L"PostMessage failed with error: " + std::to_wstring(error);
Global::LogMessageW(errorString.c_str());
if (error != 0)
{
std::wstring errorString = L"SendMessage POINT failed with error: " + std::to_wstring(error);
Global::LogMessageW(errorString.c_str());
}
else
{
Global::LogMessageW(L"SendMessage POINT success, but result is 0");
}
}
}
+11 -3
View File
@@ -575,11 +575,19 @@ void CCandidateWindow::_DrawListWithWebview2(_In_ UINT iIndex)
cds.dwData = 1;
cds.cbData = (candWString.size() + 1) * sizeof(WCHAR);
cds.lpData = (PVOID)candWString.c_str();
if (!SendMessage(UIHwnd, WM_COPYDATA, (WPARAM)UIHwnd, (LPARAM)&cds))
LRESULT result = SendMessage(UIHwnd, WM_COPYDATA, (WPARAM)UIHwnd, (LPARAM)&cds);
if (result == 0)
{
DWORD error = GetLastError();
std::wstring errorString = L"PostMessage failed with error: " + std::to_wstring(error);
Global::LogMessageW(errorString.c_str());
if (error != 0)
{
std::wstring errorString = L"SendMessage CandidateWString failed with error: " + std::to_wstring(error);
Global::LogMessageW(errorString.c_str());
}
else
{
Global::LogMessageW(L"SendMessage CandidateWString success, but result is 0");
}
}
}
}