- Joined
- Mar 28, 2008
- Messages
- 666
- Reaction score
- 20
- Points
- 33
Hi,
it's possible that i'm a bit stupid sometimes,
but my question is, how can i query a keyboard key in an orbiter dll?
I've tryed to inserd this in the orbiter module, but it's not working.
Is it called automaticly by pressing a key or when it will be called?
I have not so much expirince with the Windows API...
it's possible that i'm a bit stupid sometimes,
but my question is, how can i query a keyboard key in an orbiter dll?
I've tryed to inserd this in the orbiter module, but it's not working.
Is it called automaticly by pressing a key or when it will be called?
I have not so much expirince with the Windows API...
Code:
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_KEYDOWN:
switch (wParam)
{
case VK_LEFT:
left = true;
sprintf(oapiDebugString(),"LEFT ARROW PRESSED");
break;
}
}
return 0;
}