problem with reacquiring the keyboarddevice...
i have made a standard keyboard device with directx8 and it works great until another application gets the focus and i
then my application gets the focus back and i want to reacquire
the device when i receive the WM_ACTIVE message with
m_pDevice->Acquire( ).
But when the app gets the focus back it return an device-error.
Does anybody have an solution ?
Have you tried different cooperative levels for your keyboard? You might want to try setting it to non exclusive and in the background.
------------------------------
"I''m a decorated astronaut, I don''t make those kind of mistakes."
"Oh now wait a minute. Look I''ll show ya. I''ll enter the same calculations using what we like to call ''The Right Way''."
-Rem
Zirem Software
------------------------------
"I''m a decorated astronaut, I don''t make those kind of mistakes."
"Oh now wait a minute. Look I''ll show ya. I''ll enter the same calculations using what we like to call ''The Right Way''."
-Rem
Zirem Software
Yes i already have tried all possible combinations of cooperative flags. I think thats not the problem.
I think your problem is that your aquiring the keyboard when your app loses focus and regains focus.
Try acquring the keyboard when you receive focus, and release it when you lose focus.
Personally, my DirectX lib doesn''t have this problem
------------------------------
"I''m a decorated astronaut, I don''t make those kind of mistakes."
"Oh now wait a minute. Look I''ll show ya. I''ll enter the same calculations using what we like to call ''The Right Way''."
-Rem
Zirem Software
Try acquring the keyboard when you receive focus, and release it when you lose focus.
Personally, my DirectX lib doesn''t have this problem
------------------------------
"I''m a decorated astronaut, I don''t make those kind of mistakes."
"Oh now wait a minute. Look I''ll show ya. I''ll enter the same calculations using what we like to call ''The Right Way''."
-Rem
Zirem Software
i acpuire the device when i get the focus.
But do i really need to unacquire it when i loose the focus?
Doesn''t it unacquire by itself or by windows?
But do i really need to unacquire it when i loose the focus?
Doesn''t it unacquire by itself or by windows?
As far as I know, it doesn''t.
------------------------------
"I''m a decorated astronaut, I don''t make those kind of mistakes."
"Oh now wait a minute. Look I''ll show ya. I''ll enter the same calculations using what we like to call ''The Right Way''."
-Rem
Zirem Software
------------------------------
"I''m a decorated astronaut, I don''t make those kind of mistakes."
"Oh now wait a minute. Look I''ll show ya. I''ll enter the same calculations using what we like to call ''The Right Way''."
-Rem
Zirem Software
It returns DIERR_NOTACQUIRED, when i call "GetDeviceState()"
But i''m acquierung it when the WM_ACTIVE-Message arives and there it returns no error.
So I don''t understand why it can not be acquired.
But i''m acquierung it when the WM_ACTIVE-Message arives and there it returns no error.
So I don''t understand why it can not be acquired.
...and if i try to acquire it every frame before i use "GetDiveState()" it returns DIERR_OTHERAPPHASPRIO.
I can''t understand that.
I can''t understand that.
This is unlikely, but it could just be your development machine. Hit Ctrl-Alt-Del to get the task list and close all unrelated processes. There might be something running there that has taken control of the keyboard.
Superpig
- saving pigs from untimely fates
Superpig
- saving pigs from untimely fates
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement