Head Geek
Head Geek

Reputation: 39838

How can I enumerate top-level wxWidgets windows belonging to my process?

My program may have several top-level windows open at a time, and I need to send a particular message to all of them (a notification of a change). I know how to do it using the Win32 API, but this is a cross-platform program using wxWidgets. I can't seem to find anything in the wxWidgets documentation about this, but that may simply be because I don't know what to look for.

I can solve this by having each of the top-level windows register itself with the wxApp object when it's created, but that's a manual process that I'm likely to forget on occasion, so I'd rather avoid it if possible. Does anyone know of an existing solution?

Upvotes: 0

Views: 1011

Answers (1)

JohnPS
JohnPS

Reputation: 2616

There is a global variable wxTopLevelWindows that is a list of the top level windows. See this wxWidgets Discussion Forum thread

Upvotes: 3

Related Questions