1 / 7

Selection Structures in Windows Programming

Learn about selection structures in Windows programming, including relational and logical operators, algorithms, sequential and selective structures, and the usage of TCheckBox, TRadioButton, and TGroupBox.

Télécharger la présentation

Selection Structures in Windows Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 5 Selection Structures Windows Programming, C.-S. Shieh, KUAS EC, 2005

  2. 5.1 Relational and Logical Operators • Relational Operators ==,!=, >, <, >=, <= • Logical Operators &&, ||, ! if(a==b && (x>1 || y<=0)) c=a; else c=b; Windows Programming, C.-S. Shieh, KUAS EC, 2005

  3. 5.2 Algorithms • Flow Chart • Algorithms Windows Programming, C.-S. Shieh, KUAS EC, 2005

  4. 5.3 Structural Programming • Sequential Structures • Selective Structures • if ( … ) … else … ; • … ? … : … Ex. x=(a>b)?a:b; • switch-case • Iterative Structures • for(… ; … ; … ) … ; • while( … ) … ; • do … while(…); Windows Programming, C.-S. Shieh, KUAS EC, 2005

  5. 5.6 TCheckBox • Presents an option that a user can toggle between Yes/No or true/false. • Properties • Caption (AnsiString), Checked (bool), Enabled (bool) • Events • OnClick Windows Programming, C.-S. Shieh, KUAS EC, 2005

  6. 5.7 TRadioButton • Radio buttons present a set of mutually exclusive options to the user. • Properties • Caption (AnsiString), Checked (bool), Enabled (bool) • Events • OnClick Windows Programming, C.-S. Shieh, KUAS EC, 2005

  7. 5.9 TGroupBox • Provides a container to group-related options on a form. • Properties • Caption (AnsiString), Enabled (bool) Windows Programming, C.-S. Shieh, KUAS EC, 2005

More Related