Would a DLL be ok
Sure:)
What I'm up to is working on an IDE. So, when I launch/run the compiler app. I set the IDE window to "TopMost" and then set foucus to that window. I next use FindWindow() to look for a specific compiler window and then when it's gone continue to run the compiled app. This is the only way I could get it all to work. FindWindow() seems not to work unless I set the window to "TopMost" and SetFocus().
Getting the window to stay active would be nice. But getting ShowWindow() to work right would be even better. ShowWindow() seems to work oddly with B+. I tried minimizing and then restoring the IDE window, which worked, but it for some reason stays inactive when it's restored (huh..what). In fact after doing this no windows are active on the desktop. Soooo.. I hope this add s some light to at least what I'm doing.
BTW.. These are the ShowWindow() flags I'm using:
;#define SW_HIDE 0
;#define SW_SHOWNORMAL 1
;#define SW_NORMAL 1
;#define SW_SHOWMINIMIZED 2
;#define SW_SHOWMAXIMIZED 3
;#define SW_MAXIMIZE 3
;#define SW_SHOWNOACTIVATE 4
;#define SW_SHOW 5
;#define SW_MINIMIZE 6
;#define SW_SHOWMINNOACTIVE 7
;#define SW_SHOWNA 8
;#define SW_RESTORE 9
;#define SW_SHOWDEFAULT 10
;#define SW_FORCEMINIMIZE 11
;#define SW_MAX 11
-- EDIT --
Well.. I still need a "TopMost" window but it's not needed to get FindWindow() to work correctly. If I use WaitEvent(0) (notice the zero) instead of WaitEvent() FindWindow() seems to work fine. It's polling all the time that way but I guess it makes sence. ShowWindow() was unaffected (still not working) by zero polling.
Thanks for the help :)
L8r,