Designing Property Pages

Property pages are dialog boxes that you create with a Windows resource editor. They have specific design requirements.

    To design a property page dialog box
  1. The following two controls are required on every property page:
    ICON 6031, IDC_ADMINICON,6,6,18,20,WS_GROUP
    LTEXT "", IDC_TITLE, 35,8,180,16, WS_GROUP
     

    These controls define standard positions for displaying a title and an icon on the property page. When the property page dialog box is initialized, it is sent a WM_INITDIALOG message. The Administrator extension DLL calls the PADMIN_SetIcon and PADMIN_SetTitle functions to specify where the icon and title are to be displayed, by passing the IDC_ADMINICON and IDC_TITLE resource IDs to the Administrator program.

    The Platform SDK Resource Editor can be used to create the Icon and Text controls, paying attention to the pixel positions that indicate control size and screen placement. Alternatively, you can type the two lines above, verbatim, into your RC file using a text editor.

  2. Create at least one tab-stopped control for each property page.
  3. Write a standard Windows dialog procedure for each property-page dialog box.
  4. Make sure that the hwnd handle you supply to the dialog procedure of your custom property page is the hwnd handle of the property page itself, not the hwnd of the entire property sheet.

    This is important if you intend to display child message or dialog boxes from within the custom property page. In this case, the parent of the hwnd handle should be passed. You can easily obtain this handle by using the Win32 GetParent function. Failing to pass the hwnd handle of the parent window will cause your new dialog box to be nonmodal. This procedure is illustrated in the validation code in the SGWADMIN.CPP file, which is the extension DLL of the sample gateway application. The SGWADMIN.CPP file is located in the BKOFFICE\samples\exchange\SGWADMIN directory.

    The bValidate member function displays a message box and passes the correct hWnd handle if the user enters invalid data.

Note One Administrator extension DLL can support multiple languages. This means you do not have to write additional DLLs if you must localize your application. The Microsoft Exchange Server Administrator program is currently localized into French, German, English (US), and Japanese versions.