FAR EventHandler(WHandle theWindow, EventRec FAR *ev) { switch(ev->what) { case keyDownEvent: if (ev->modifiers & shiftCodeMask) /* A modifier was pressed. */ { if (ev->modifiers & altKey) /* Alt Key */ _PutStr("Alt Key Code should be used.\n"); else if (ev->modifiers & ctrlKey) /* Ctrl Key */ _PutStr("Ctrl Key Code should be used.\n"); else if (ev->modifiers & shiftKey) /* Shift Key */ _PutStr("Shift Key Code should be used.\n"); } else /* Normal Key press */ _PutStr("Regular Key Code should be used.\n"); return NO; break; default: return NO; } return YES; }
void CStringz::Show() { if (str==NULL) _UserError("CStringz Show: Null string"); Refresh(); _PutStr(str); }
void hello(ParamBlk *parm) // the function definition { _PutStr("\nHello, World!\n"); //print the message }