Which proect should i make console or windows?
and what exactly should i write in Form.cs?
private void Form1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
switch(e.KeyCode) {
case Keys.F9:
MessageBox.Show("F9 pressed");
break;
default:
break;
}
}
case WM_KEYDOWN:
{
event.EventType = irr::EET_KEY_INPUT_EVENT;
event.KeyInput.Key = (irr::EKEY_CODE)wParam;
event.KeyInput.PressedDown = true;
dev = getDeviceFromHWnd(hWnd);
BYTE allKeys[256];
WORD KeyAsc=0;
GetKeyboardState(allKeys);
ToAscii(wParam,lParam,allKeys,&KeyAsc,0);
event.KeyInput.Shift = ((allKeys[VK_SHIFT] & 0x80)!=0);
event.KeyInput.Control = ((allKeys[VK_CONTROL] & 0x80)!=0);
event.KeyInput.Char = KeyAsc; //KeyAsc >= 0 ? KeyAsc : 0;
if (dev)
dev->postEventFromUser(event);
return 0;
}
//other event has familiar processing.
michael520 wrote:I am thinking about how to modify Irr's message processing routines, and make it more friendly for applications such as level editor etc with other window gui elements in the same form...
In fact, this problem exist both in C++ and C# because they both have the same WndProc() in Irrlicht.dll.
It may be a hard job...
Ros wrote:shurijo
say:Its much easier to handle events using Irrlicht without putting it in a picturebox (using the IrrlichtDevice window instead of a WinForm).
How? where i can look example of code?![]()
![]()
Ros wrote:
shurijo
say:
Quote:
Its much easier to handle events using Irrlicht without putting it in a picturebox (using the IrrlichtDevice window instead of a WinForm).
How? where i can look example of code?
All of the tutorials (with the exception of the WinForm tutorial) use an IrrlichtDevice without placing it on a .NET WinForm.

Users browsing this forum: No registered users and 0 guests