pFormatRect (PPOINTL)

      New format dimensions.

      NULL

        A null value sets both dimensions to the current window size.
      other
        The structure is a pair of LONGs designating the diagonally-opposite corner of the rectangle, assuming 0,0 for the first. Therefore, they are the width and height in pels of the format rectangle. These dimensions are used as the word-wrap and text-size limiting boundaries. Negative values for either dimension cause the MLE to substitute the current window size (the MLE window rectangle minus margins).

        If the rectangle specified has either, or both, of the limits set, and the size is inadequate to contain the text, rc is set to FALSE and the rectangle dimensions are replaced with the overflow amounts.

      flFlags (ULONG)

        Flags governing interpretation of dimensions.

        MLFFMTRECT_MATCHWINDOW

          The dimensions of the format rectangle are always to be kept the same as the window size minus the margins. This causes the MLE implicitly to do a MLM_SETFORMATRECT each time the window is resized, and effectively causes any other dimensions to be ignored. Resizing of the window can cause this setting to be automatically negated (see MLN_OVERFLOW).
        MLFFMTRECT_LIMITHORZ
          The width of any line in the MLE cannot exceed the given horizontal dimension. If word-wrap is on, this limit has no effect. Word-wrap can result in trailing blanks beyond the right limit. These do not cause an overflow notification.
        MLFFMTRECT_LIMITVERT
          The vertical height of the total text, as displayed, is limited to that which fits totally within the vertical dimension of the format rectangle.

        rc (BOOL)

          Success indicator.

          TRUE

            Successful completion
          FALSE
            An error occurred.


          [Back] [Next]