THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/02/2011 at 06:56, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R12
Platform: Windows ;
Language(s) : C++ ;
---------
I have a dialog with a button in it. When that button is clicked I'd like to know whether the user is holding down the Ctrl key or not. The docs for the GeDialog.Command() function imply that the status is returned in the base container passed in the function parameters, but I can't get it to work. The bare bones of the Command() function look like this:
Bool MyDialog::Command(LONG id, const BaseContainer& msg)
{
Bool value;
switch(id)
{
case MY_BUTTON:
value = FALSE;
msg.GetBool(BFM_ACTION_DP_SUBSELECT, value);
if(!value) // Ctrl not pressed
{
// do something
}
else // Ctrl is pressed
{
// do something else
}
break;
}
}
In this code, the 'else' code is never executed. Is this the right way to go about checking the key status? If it is, what am I doing wrong?