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

[Question] How to handle windows messages specially? #12001

Closed
ethindp opened this issue Jan 16, 2025 · 1 comment
Closed

[Question] How to handle windows messages specially? #12001

ethindp opened this issue Jan 16, 2025 · 1 comment

Comments

@ethindp
Copy link

ethindp commented Jan 16, 2025

Not sure if this is the right place to ask this, but is there some way I can tell SDL to let me handle windows messages specially? I know that there's SDL_SetWindowsMessageHook, but this doesn't quite do what I want because I need to call UiaReturnRawElementProvider, which returns an LRESULT which I need to return to the WNDPROC for returning to Windows. I suppose I could turn off SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP, but this seems like a very bad idea and like it could very easily go wrong. Does functionality like this exist? Or if it doesn't, can it be added?

@slouken
Copy link
Collaborator

slouken commented Jan 17, 2025

After you create the window, you can get the window handle and get/set the window proc used. You can get the window handle with SDL_PROP_WINDOW_WIN32_HWND_POINTER and change the window proc with GWLP_WNDPROC

@slouken slouken closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2025
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

2 participants