C++ Win32 API Get HWND of MessageBox

Does anyone know how to get the HWND of a message box?
guestgulkan, did you read the post in that link of yours? Sounds strange to me that the guy is passing the ID from GetCurrentThreadId(). If the message box belongs to the current thread, wouldn't that mean the thread is blocked in the modal loop of the message box, meaning this code cannot run???

I would imagine that the procedure works but from a different thread, not the thread that created the dialog box. Right?
I only skimmed it to see if it was relevant to the OP's question.
Topic archived. No new replies allowed.