Right, that's what I'm doing. Its too complex to tell you HOW I'm doing it, but I can Say that following Jenzai instructions wouldn't hurt because that model for GUI that Microsoft uses in the WINAPI is similiar to almost EVERY GUI I know about that is scalable (Meaning works equally well with one ot two windows or a hundred of them .. speed lag aside... hundred windwos is alot LOL
)
The trick is making a System that can store "MESSAGES" in a FIFO. Messages like MSG_WINDOWSETFOCUS, MSG_WINDOWGOTFOCUS, MSG_LOSTFOCUS. Baby steps really... Then There is usually two main routines you call for "STOCK" usage, and when you start making your own code control things.. like disabling this button because the user hasn't typed in their name yet etc.. its gets a little trickier... but.. that's called event programming, and its not hard to do, however its a bit hard to MAKE it HAPPEN from scratch.
I also think its fun making GUI and frustrating at the same time.
The way I make it Not interfere with the "Game" to much is that the GUI can be turned on/off AND if on simultaneously, it only REALLY "WORKS" hard when you interact in a way that is "Captured" by the gui.
The reason the gui seems to multi-thread because its only little gear in the proverbial game engine, and like everything else in the game, its multiplexed. (One Thread, tasks all have a turn... some of which only happen at timed intervals, etc) I do have Physics working in a separate thread, and I suspect my eventual multiplayer netorking code will be multithreaded as well... but in short.. the GUI does not interfere with Game Play within reason.
Why within reason? If steps aren't taken, and a window is on the screen, and you say have an FPS game that has mouse camera (eyes) movement.. and the invisible mouse goes over the gui... WHOA.. GUI Owns it! I can make invisible mouse pointer mean don't allow this, I can make it do anything I want really.. like.. Right Click to enable GUI... or not.. whatever.. its not a problem, and I'll simply make it work on a case by case basis so the user gets an interface that makes sense.... at least I'll try