Closed vmtest888 closed 11 months ago
createParams->lpcs->lpszClass may be of type atom
LRESULT CALLBACK monitorFlutterWindowsProc( _In_ int code, _In_ WPARAM wparam, _In_ LPARAM lparam) { if (code == HCBT_CREATEWND) { auto createParams = reinterpret_cast<CBT_CREATEWND*>(lparam); if (!createParams->lpcs->lpCreateParams) { return 0; } if(IS_INTRESOURCE(createParams->lpcs->lpszClass)){ return 0; } if (wcscmp(createParams->lpcs->lpszClass, L"FLUTTER_RUNNER_WIN32_WINDOW") == 0) { flutter_window = (HWND)wparam; SetWindowSubclass(flutter_window, main_window_proc, 1, NULL); } else if (wcscmp(createParams->lpcs->lpszClass, L"FLUTTERVIEW") == 0) { flutter_child_window = (HWND)wparam; SetWindowSubclass(flutter_child_window, child_window_proc, 1, NULL); } } if ((flutter_window != nullptr) && (flutter_child_window != nullptr)) { UnhookWindowsHookEx(flutterWindowMonitor); } return 0; }
我也遇到了
if(IS_INTRESOURCE(createParams->lpcs->lpszClass)){ return 0; }
加上这句就行了
Please try updating to the latest bitsdojo_window version.
bitsdojo_window
createParams->lpcs->lpszClass may be of type atom