Application developed with Microsoft Visual C++, Part 3.


Arrange and add controls.

  1. Work with existing controls . - (created by AppWizard)

    1. Delete the Push Button - IDCANCEL.

    2. Modify the Puch Button - IDOK, Puch Button Properties:
      Right click the Button and click Properties on the shortcut menu to open the Push Button Properties dialog box:
        The old values The New values
      General tab
      * ID:
      * Caption:
      *
      boxes checked
      Styles tab
      * Horizontal alignment:
      * Vertical alignment:

      IDOK
      OK
      Visible, Tab stop

      Default
      Default

      IDOK
      Close
      Visible, Tab stop

      Default
      Default


  2. Add controls ...

    1. Add the Picture - IDC_STATIC (Bitmap), Picture Properties:
      The CStatic class provides the functionality of a Windows static control. A static control displays a text string, box, rectangle, icon, cursor, bitmap, or enhanced metafile. It can be used to label, box, or separate other controls. A static control normally takes no input and provides no output.

      Right click the Picture and click Properties on the shortcut menu to open the Picture Properties dialog box:
      General tab
      * ID:
      *
      box checked
      * Type:
      * Image:

      IDC_STATIC
      Visible
      Bitmap
      IDB_THEDATA


    2. Add the Picture - IDC_STATIC (Frame), Picture Properties:
      Right click the Picture and click Properties on the shortcut menu to open the Picture Properties dialog box:
      General tab
      * ID:
      *
      box checked
      * Type:
      * Color:

      IDC_STATIC
      Visible
      Frame
      Black


    3. Add the Static Text - IDC_STATIC, Static Text Properties:
      The CStatic class provides the functionality of a Windows static control. A static control displays a text string, box, rectangle, icon, cursor, bitmap, or enhanced metafile. It can be used to label, box, or separate other controls. A static control normally takes no input and provides no output.

      Right click the Static Text and click Properties on the shortcut menu to open the Text Properties dialog box:
      General tab
      * ID:
      * Caption:
      *
      boxes checked
      Styles tab
      * Align text:

      IDC_STATIC
      Book:
      Visible, Group

      left


    4. Add the Static Text - IDC_BOOK, Static Text Properties:
      Right click the Static Text and click Properties on the shortcut menu to open the Text Properties dialog box:
      General tab
      * ID:
      *
      boxes checked
      Styles tab
      * Align text:

      IDC_BOOK
      Visible, Group

      left


    5. Add the Static Text - IDC_STATIC, Static Text Properties:
      Right click the Static Text and click Properties on the shortcut menu to open the Text Properties dialog box:
      General tab
      * ID:
      * Caption:
      *
      boxes checked
      Styles tab
      * Align text:

      IDC_STATIC
      Chapter:
      Visible, Group

      left


    6. Add the Static Text - IDC_CHAPTER, Static Text Properties:
      Right click the Static Text and click Properties on the shortcut menu to open the Text Properties dialog box:
      General tab
      * ID:
      *
      boxes checked
      Styles tab
      * Align text:

      IDC_CHAPTER
      Visible, Group

      left


    7. Add the Static Text - IDC_STATIC, Static Text Properties:
      Right click the Static Text and click Properties on the shortcut menu to open the Text Properties dialog box:
      General tab
      * ID:
      * Caption:
      *
      boxes checked
      Styles tab
      * Align text:

      IDC_STATIC
      Title:
      Visible, Group

      left


    8. Add the Static Text - IDC_TITLE, Static Text Properties:
      Right click the Static Text and click Properties on the shortcut menu to open the Text Properties dialog box:
      General tab
      * ID:
      *
      boxes checked
      Styles tab
      * Align text:

      IDC_TITLE
      Visible, Group

      left


    9. Add the Static Text - IDC_STATIC, Static Text Properties:
      Right click the Static Text and click Properties on the shortcut menu to open the Text Properties dialog box:
      General tab
      * ID:
      * Caption:
      *
      boxes checked
      Styles tab
      * Align text:

      IDC_STATIC
      Verse:
      Visible, Group

      left


    10. Add the Static Text - IDC_VERSE, Static Text Properties:
      Right click the Static Text and click Properties on the shortcut menu to open the Text Properties dialog box:
      General tab
      * ID:
      *
      boxes checked
      Styles tab
      * Align text:

      IDC_VERSE
      Visible, Group

      left


    11. Add the Edit Box - IDC_TEXTDATA, Edit Properties:
      The CEdit class provides the functionality of a Windows edit control. An edit control is a rectangular child window in which the user can enter text.
      You can create an edit control either from a dialog template or directly in your code. In both cases, first call the constructor CEdit to construct the CEdit object, then call the Create member function to create the Windows edit control and attach it to the CEdit object.


      Right click the Edit Box and click Properties on the shortcut menu to open the Edit Properties dialog box:
      General tab
      * ID:
      *
      boxes checked
      Styles tab
      * Align text:
      * boxes checked
      Extended Styples tab
      *
      box checked

      IDC_TEXTDATA
      Visible, Tab stop

      left
      Multiline, Auto Vscroll, Border, Read-only

      Transparent


    12. Add the Push Button - IDC_RECORD_FIRST, Push Button Properties:
      The CButton class provides the functionality of Windows button controls. A button control is a small, rectangular child window that can be clicked on and off. Buttons can be used alone or in groups and can either be labeled or appear without text. A button typically changes appearance when the user clicks it.
      Typical buttons are the Check Box, Radio Button, and Push Button.


      Right click the Button and click Properties on the shortcut menu to open the Push Button Properties dialog box:
      General tab
      * ID:
      * Caption:
      *
      boxes checked
      Styles tab
      * Horizontal alignment:
      * Vertical alignment:

      IDC_RECORD_FIRST
      |<<
      Visible, Tab stop

      Default
      Default


    13. Add the Push Button - IDC_RECORD_PREV, Push Button Properties:
      Right click the Button and click Properties on the shortcut menu to open the Push Button Properties dialog box:
      General tab
      * ID:
      * Caption:
      *
      boxes checked
      Styles tab
      * Horizontal alignment:
      * Vertical alignment:

      IDC_RECORD_PREV
      <<
      Visible, Tab stop

      Default
      Default


    14. Add the Push Button - IDC_RECORD_NEXT, Push Button Properties:
      Right click the Button and click Properties on the shortcut menu to open the Push Button Properties dialog box:
      General tab
      * ID:
      * Caption:
      *
      boxes checked
      Styles tab
      * Horizontal alignment:
      * Vertical alignment:

      IDC_RECORD_NEXT
      >>
      Visible, Tab stop

      Default
      Default


    15. Add the Push Button - IDC_RECORD_LAST, Push Button Properties:
      Right click the Button and click Properties on the shortcut menu to open the Push Button Properties dialog box:
      General tab
      * ID:
      * Caption:
      *
      boxes checked
      Styles tab
      * Horizontal alignment:
      * Vertical alignment:

      IDC_RECORD_LAST
      >>|
      Visible, Tab stop

      Default
      Default


    16. Add the Picture - IDC_STATIC (Bitmap), Piture Properties:
      Right click the Picture and click Properties on the shortcut menu to open the Piture Properties dialog box:
      General tab
      * ID:
      *
      box checked
      * Type:
      * Image:

      IDC_STATIC
      Visible
      Bitmap
      IDB_SEARCH


    17. Add the Picture - IDC_STATIC (Frame), Picture Properties:
      Right click the Picture and click Properties on the shortcut menu to open the Piture Properties dialog box:
      General tab
      * ID:
      *
      box checked
      * Type:
      * Color:

      IDC_STATIC
      Visible
      Frame
      Black


    18. Add the Group Box - IDC_STATIC, Group Box Properties:
      Right click the Group Box and click Properties on the shortcut menu to open the Group Box Properties dialog box:
      General tab
      * ID:
      *
      box checked
      * Horizontal alignment:

      IDC_STATIC
      Visible
      Default


    19. Add the Picture - IDC_STATIC (Bitmap), Piture Properties:
      Right click the Picture and click Properties on the shortcut menu to open the Piture Properties dialog box:
      General tab
      * ID:
      *
      box checked
      * Type:
      * Image:

      IDC_STATIC
      Visible
      Bitmap
      IDB_DIAM1


    20. Add the Push Button - IDC_ABOUT, Push Button Properties:
      Right click the Button and click Properties on the shortcut menu to open the Push Button Properties dialog box:
      General tab
      * ID:
      * Caption:
      *
      boxes checked
      Styles tab
      * Horizontal alignment:
      * Vertical alignment:

      IDC_ABOUT
      About
      Visible, Tab stop

      Default
      Defaul


    Note:
    The TestVC0.rc file stores information about all controls included in IDD_
    TESTVC0_DIALOG.
    Examine this information,
    click here.

  3. Save this application.
    Run
    it, from Build menu, choose and click Execute TestVC0.exe.
  4. The Code files ... (Next page ------->)

Previous
Home 3 Home
Next