I am trying to filter out the 'return' key and 'esc' key in a dialog window. I know how to pass a UniversalProcPtr to ModalDialog( gMyModalProc, &itemHit); and filter out the keys. When I use DialogSelect(&gMainEventRecord, &hitWindow, &itemHit); and try to filter out the keys the keys get passed anyway. I have a dialog window with three edit text fields, I would like to limit two edit fields to 4 chars each and the other to 31 chars. How can I get around this?
if(DialogSelect(&gMainEventRecord, &hitWindow, &itemHit))
Boolean HandleFileInfoDialog (short itemHit, EventRecord *theEvent)
if(theEvent->what == keyDown)
switch((theEvent->message) & charCodeMask)
itemHit = 1;