Debugging macros

21 views
Skip to first unread message

Paris Rossano

unread,
Jan 27, 2026, 8:33:55 AM (9 days ago) Jan 27
to wx-u...@googlegroups.com
Dear all, sorry for the silly question, but it’s not clear to me whether the
macros in the following context, which should show dialog messages, work if
called from a secondary thread.
[ https://docs.wxwidgets.org/latest/group__group__funcmacro__debug.html ]

Thanks
Rossano Paris

Igor Korot

unread,
Jan 27, 2026, 1:57:32 PM (9 days ago) Jan 27
to wx-u...@googlegroups.com
Hi,

No GUI should be called from secondary thread.

EVER!!!

Thank you.


--
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
---
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-users+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wx-users/8933c5d3-719d-462c-b761-120ba9bf2a3a%40escadasolutions.com.

Vadim Zeitlin

unread,
Jan 27, 2026, 2:32:10 PM (9 days ago) Jan 27
to wx-u...@googlegroups.com
On Tue, 27 Jan 2026 14:33:47 +0100 Paris Rossano wrote:

PR> Dear all, sorry for the silly question, but it’s not clear to me whether the
PR> macros in the following context, which should show dialog messages, work if
PR> called from a secondary thread.
PR> [ https://docs.wxwidgets.org/latest/group__group__funcmacro__debug.html ]

Yes, they work when called from a non-GUI thread because they use a low
level native function (e.g. ::MessageBox() under MSW) and not wx
facilities.

Note that you may also define your own assert handler which can use
wxIsMainThread() to check the context in which it is called and do things
differently in the GUI and other threads.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
https://www.tt-solutions.com/

Paris Rossano

unread,
Jan 28, 2026, 5:24:11 AM (8 days ago) Jan 28
to wx-u...@googlegroups.com, Vadim Zeitlin
thank you
regards
Rossano

Paris Rossano

unread,
Jan 28, 2026, 5:24:21 AM (8 days ago) Jan 28
to wx-u...@googlegroups.com, Igor Korot
Reply all
Reply to author
Forward
0 new messages