Original Post
Hallo everybod I''m experiencing a new (for me of course)problem ...
I''ve an application that does the following things :
1)creates a window.
2)after window creation starts a new thread and from inside this
creates a new window that is used to render.
so I ve two message loops acting together one for the rendering window (that''s in foreground and it''s contained in the thread
created by app),
and the other in the app that created the thread.
The question arises when I try to Call GetAsyncKeyState for getting keyboard input for updating camera position.
It fails.(while if I call updating routines from inside a WM_CHAR message in the render wnd_proc all works fine).
On MSDN I found :
Windows NT/2000/XP: The return value is zero for the following cases:
The current desktop is not the active desktop
The foreground thread belongs to another process and the desktop does not allow the hook or the journal record.
So I''m asking if this is the real problem(It''s the first time I write a program that renders from a thread,
before I simply used the main window for rendering intead of creating a second one),
and if so if anybody could suggest me a way to solve this,
or if it''s not the problem what is going wrong?
(As i told before updating routines work well,
I''m pretty sure it''s GetAsync... that fails)
Many Thanks
Saberman
I checked