Hour 6:

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


9th Step
, IDD_BIOGRAPHY dialog
.

  1. Create a new dialog.

    1. Select the TestVC0 resources. From the right mouse pop-up menu, click Insert.
    2. In the Insert Resources dialog box, select Dialog Icon and then click New.

      Note:
      New i
      tem added to the Dialog folder in the Insert Resources.
      New dialog design appears, in the Dialog editor window.

      T
      he dialog design:
      Dialog


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

    3. Modify the Dialog Properties - IDD_DIALOG1 and rename it.
      Right click the Dialog and click Properties on the shortcut menu to open the Dialog Properties dialog box:
        The old values The new values
      General tab
      * ID:
      * Caption:
      Styles tab
      * Style:
      * Border:
      *
      boxes checked
      More Styles tab
      *
      boxes checked

      IDD_DIALOG1
      Dialog

      Popup
      Dilog Frame
      Title bar, System menu

      IDD_BIOGRAPHY
      Biography ...

      Popup
      Dilog Frame
      Title bar, System menu

      Visible, Center


  2. The IDD_BIOGRAPHY dialog design.
    Biography ...


  3. Add files ...
    From the ...\VC App\res folder copy the followihg files:
    • The file - butterfly1.bmp (Bitmap Image)to the folder C:\TestC\Test VC0\res.
    • The file - butterfly2.bmp (Bitmap Image) to the folder C:\TestC\Test VC0\res.


  4. Graphics ...

    1. Import the Bitmap file - butterfly1.bmp - TestVC0 resources.
      • Select TestVC0 resources. From the right mouse pop-up menu, click Import.
      • In the Insert Resources dialog box, select the file butterfly1 in the folder
        C:\TESTC\TestVC0\res and then click Import.

        Note:
        In the Bitmap folder
        , new item appears - IDB_BITMAP1.
      • Select IDB_BITMAP1. From the right mouse pop-up menu,
        click Properties.
      • In the Bitmap Properties dialog box, modify the data:
        The old value The new value
        ID: IDB_BITMAP1
        ID: IDB_BUTTERFLY1

        From the File menu, click Save.


    2. Import the Bitmap file - butterfly2.bmp - TestVC0 resources.
      • Select TestVC0 resources. From the right mouse pop-up menu, click Import.
      • In the Insert Resources dialog box, select the file diam1 in the folder
        C:\TESTC\TestVC0\res and then click Import.

        Note:
        In the Bitmap folder
        , new item appears - IDB_BITMAP1..
      • Select IDB_BITMAP1. From the right mouse pop-up menu,
        click Properties.
      • In the Bitmap Properties dialog box, modify the data:
        The old value The new value
        ID: IDB_BITMAP1
        ID: IDB_BUTTERFLY2

        From the File menu, click Save.

  5. Controls ...

    1. Delete the Push Button - IDCANCEL.

    2. Modify the Puch Button - IDOK, Push 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
      Done
      Visible, Tab stop

      Default
      Default


    3. Add the Picture - IDC_STATICBITMAP (Bitmap), 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:
      * Image:

      IDC_STATICBITMAP
      Visible
      Bitmap
      IDB_BUTTERFLY1


    4. Add the Static Text - IDC_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
      Name: Chucri Simon Zouein
      Visible, Group

      Default


    5. Add the Static Text - IDC_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
      Address: Sed El Baouchrie Korlokian Bld, Beirut, Lebanon
      Visible, Group

      Default


    6. Add the Static Text - IDC_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
      Tel: 01-691436
      Visible, Group

      Default


    7. Add the Static Text - IDC_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
      Signification: Engineer on Computing and Software Systems
      Visible, Group

      Default

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

  6. Activate the Timer operation ...
    Provides repeated calls based on the Timer control's interval. To display the Bitmap files - butterfly1.bmp and butterfly2.bmp.
    This operation make changes to TestVC0Dlg.h and TestVC0Dlg.cpp files. Examine these changes,
    click here.

  7. Activate the Link operation ...
    To load the
    IDD_BIOGRAPHY dialog, using the Push Button IDC_CREATED - (a member of the
    IDD_ABOUTBOX dialog).

    This operation make changes to TestVC0Dlg.cpp file. Examine these changes, click here.

  8. Save this application.
    Run
    it, from Build menu, choose and click Execute TestVC0.exe.

Note:

The analogue application stored in the folder VC App of the Visual_C++ folder. For more information, read the readmeVC.htm file


Previous
Home 11 Home