IonicWind Software

Aurora Compiler => GUI => Topic started by: cip on November 21, 2007, 02:18:53 PM

Title: OnCommand - wparam
Post by: cip on November 21, 2007, 02:18:53 PM
I'd like to have an example using OnCommand and wparam
Title: Re: OnCommand - wparam
Post by: Bruce Peaslee on November 21, 2007, 09:05:25 PM
Quote from: cip on November 21, 2007, 02:18:53 PM
I'd like to have an example using OnCommand and wparam

I used this code once:


/*
+------------------------------------------------------------------------------------------------+
|   AgendaDialog::OnCommand                                                        |
+------------------------------------------------------------------------------------------------+
|   Responds to some key strokes. "Swallows" the return key.              |
+------------------------------------------------------------------------------------------------+
*/
AgendaDialog::OnCommand(unsigned int wParam, unsigned int lParam), int
{
   select wParam
   {
      case IDOK:           // user entered Enter, we ignore
         return true;
      case IDCANCEL:    // user hit esc, we close dialog
         return true;
      default:               // pass it on...
         return CDialog!!OnCommand(wparam,lparam);
   }
}
Title: Re: OnCommand - wparam
Post by: Rock Ridge Farm (Larry) on November 22, 2007, 06:28:30 AM
Enter and Esc return the same value (true) - should enter be false?
Title: Re: OnCommand - wparam
Post by: Bruce Peaslee on November 22, 2007, 09:40:42 AM
Quote from: Rock Ridge Farm (Larry) on November 22, 2007, 06:28:30 AM
Enter and Esc return the same value (true) - should enter be false?

[Esc] should close the dialog. The way I had it swallows both keys. But it shows the technique.