| Some GUIs need to communicate with others, meaning call functions in the other |
Are we talking about different windows (or views etc.)
within the same process, or completely separate processes?
I'm going to assume you mean different (or views etc.) windows within the same process.
I think you should re-design your code, if your one window (or view etc.) needs to call a function from another. Instead, you should be following a Model-View-Controller (MVC) pattern. In short, if any "state" in your application needs to be updated, then the logic (function) to modify the state goes into the
controller. The function in the controller manipulates the state in the
model as needed. Finally, whenever the "state" in the model changes, all the
view(s), i.e. the GUIs, that are connected to the model will updated themselves accordingly.
In other words, you generally don't call a function in one view (GUI) from another. Instead, from the GUI (e.g. user input) you invoke the suitable function in the
controller, so that the controller can manipulate the "state" in the
model. This will, in turn, allow the other views (GUIs) to update themselves as needed. This design provides a nice decoupling of all the views in your application!
https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
____
How do the views (GUIs) know
when something in the model has changed?
The
observer pattern is your friend here:
https://en.wikipedia.org/wiki/Observer_pattern
Simply put, the
model is the "subject" here, and the
views (GUIs) are the "subscribers". This allows the views (GUIs) to subscribe to the model. So, whenever a change to the state in the model occurs, the model notifies all the views (GUIs).
____
Honstely, these days, you can simple enter a query like "
Simple but complete Model-View-Controller example with pure Win32 API" into ChatGPT (or whatever LLMs you prefer) and that should give you something that gets your started.