Getting KeyDown Event
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/01/2007 at 21:01, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9
Platform: Windows ;
Language(s) : C++ ;---------
Hello ...In my dialog plugin ...
I want to make a calculation when the user is entering data into a textbox ...
So I try to know when the user is pressing the keys to enter data ... but I can't ...
I can only know when the user input is done and the focus is moved to another textbox ... I hope you see what I mean ...
In the otherwords ...
I want to do some process for KEYDOWN event ...
But I can only make it in LOSTFOCUS event ...How can I solve it ...?
Or is that simply what we can't in C4D?Wishing you'll do me a favor ...
Zaw Min Tun -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/01/2007 at 03:20, xxxxxxxx wrote:
you could try to the pressed keys within Message
LONG AsyncDialog::Message(const BaseContainer &msg;,BaseContainer &result;) { switch (msg.GetId()) { case BFM_INPUT: if(msg.GetLong(BFM_INPUT_DEVICE) == BFM_INPUT_KEYBOARD) { String input = msg.GetString(BFM_INPUT_ASC); GePrint(input); } break; } return GeDialog::Message(msg,result); }
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/01/2007 at 00:44, xxxxxxxx wrote:
Thank you Matthias ...
I tried it and this is what I found out ...The following code segment always shows 1 and 4 in console ...
///////
LONG dlgMine::Message(const BaseContainer& msg, BaseContainer& result)
{
GePrint("1");
switch (msg.GetId())
{
GePrint("2");
case BFM_INPUT:
if(msg.GetLong(BFM_INPUT_DEVICE) == BFM_INPUT_KEYBOARD)
{
GePrint("3");
String input = msg.GetString(BFM_INPUT_ASC);
GePrint(input);
}
break;
}
GePrint("4");
return GeDialog::Message(msg,result);
}
///////So I doubt that msg.GetId() is always returning 0 ...
So I tried this below ...///////
LONG dlgMine::Message(const BaseContainer& msg, BaseContainer& result)
{
GePrint(LongToString(msg.GetId()));
switch(msg.GetId())
{
case BFM_INPUT:
if(msg.GetLong(BFM_INPUT_DEVICE) == BFM_INPUT_KEYBOARD)
{
String input = msg.GetString(BFM_INPUT_ASC);
}
break;
}
return GeDialog::Message(msg,result);
}
///////But this time ... console is showing a very large numbers (like 1667853926,1668846437) all the time ... So they are not surely 0s ...
So why aren't the code lines in switch are not running ...?
I'm a little confusing ...
Thank you for code segment ...
It makes me curious about C4D a lot !!!Wishing you all the best ... especially the happiness ...
Zaw Min Tun