Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Potential bug] ImGui_ImplWin32_WndProcHandler does not return true. #5

Open
FoxMaccloud opened this issue Dec 19, 2021 · 0 comments
Open

Comments

@FoxMaccloud
Copy link

I wondering about your desired outcome of this mousehook. ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam) will return 0 (false) on success. With this, your mouse will both interact with the game and with overlay.

LRESULT __stdcall WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {

	if (true && ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam))
		return true;

	return CallWindowProc(oWndProc, hWnd, uMsg, wParam, lParam);
}

I did it like;

LRESULT __stdcall WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
	if (menu_show_e)
	{
		ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam);
		return TRUE;
	}
	return CallWindowProc(oWndProc, hWnd, uMsg, wParam, lParam);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant