11-20-2008 07:34 AM
SHIFT and CTRL are indeed defined as "key modifiers", but have two distinct values whose bits do not overlap. this means that you can use a bitwise AND to combine the two.
writing the resulting expression is left as an exercise for the reader...
11-20-2008 10:01 AM
Actually the combined modifier for SHIFT+CTRL is the bitwise OR of the individual modifiers (not AND).
It is already defined in <userint.h> as VAL_SHIFT_AND_MENUKEY.
If you bitwise AND you end up with 0 (zero), because their bits really do not overlap.
Checking which one (AND or OR) gives the correct answer is left as an exercise for the reader 😉
11-20-2008 10:43 AM
hum... well... i did this mistake on purpose, to see who is really following this course on boolean algebra. bonus point for those of you who noticed this error.
(in other words: ooops, sorry, i screwed up !)
11-21-2008 02:09 AM
Here's how I did an easter egg. I put an icon onto the splash panel as a picture control and wired it up with this control callback. A right double click on the icon makes the easter egg text (inserted onto the panel with the uir editor, but made initially invisible) visible.
INT CVICALLBACK IconCallback (int panel, int control, int event, void *callbackData, int eventData1, int eventData2) {
switch (event) {
case EVENT_RIGHT_DOUBLE_CLICK :
SetCtrlAttribute (panel, HELPABOUT_EASTEREGG, ATTR_VISIBLE, TRUE);
break;
}
return 0;
} // end, IconCallback