Help Injecting inputs

EthanB

24-10-2010 17:27:17

Hi,

I'm having some trouble injecting inputs into the GUI from a Window Procedure, It seems to be only working when the GUI is not drawn. I've also tried by means of what the wiki says, but its very vague and I haven't gotten that to work either.

Example:

case WM_MOUSEMOVE:
{
if ( gl_pmyGui->getInitialized() )
gl_pmyGui->getGui()->injectMouseMove( GET_X_LPARAM( lParam ), GET_Y_LPARAM( lParam ), 0 );
}
break;


The same technique worked fine with CEGUI, so I know its not something i'm doing wrong...

Any help?

Thanks,
Ethan

my.name

27-10-2010 23:42:32

look at demos in w32 input mode

EthanB

31-10-2010 23:28:37

I've looked at them, and also tried re-compiling the SDK with MYGUI_SAMPLES_INPUT to 2 (w32 mode) and still no luck, the input is only being sent to the GUI system when the GUI isn't being drawn for some reason... I can move the cursor when its not being drawn, toggle on the GUI, and the cursor will be in a different place, but when the GUI is being rendered, nothing gets injected...

Do you know what could be causing this?

Thanks,
Ethan

Altren

01-11-2010 06:26:25

Could you show more GUI related code? Also what about other inject* functions, do you call them also?
There's nothing wrong in piece of code that you shown.

EthanB

01-11-2010 19:27:48

I'm using the same exact code from Common\Input\Win32\InputManager.cpp from the svn trunk.. ( this )

It's injecting the input only when drawOneFrame() is not being called.

EDIT:

I feel so stupid. It was my fault, sorry for bothering lol.

For some stupid reason I had return 0 at the end of the window procedure instead of CallWindowProc.

Next time I'll try and pay closer attention.